Browse Source

wait for ride startc

Gildas Chabot 7 years ago
parent
commit
3b2a5150c2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      main.go

+ 3 - 0
main.go

@@ -79,6 +79,9 @@ type Car struct {
79 79
 
80 80
 func (c *Car) Update(r *Ride) {
81 81
 	c.moveTo(r.a, r.b)
82
+	if c.Arrival < r.s {
83
+		c.Arrival = r.s
84
+	}
82 85
 	c.moveTo(r.x, r.y)
83 86
 	c.Rides = append(c.Rides, r.ID)
84 87
 }