|
|
@ -48,6 +48,7 @@ func (t *TravelState) Enter(c *Connection) {
|
|
|
|
c.Printf("Trip duration: %v\n", t.tripTime())
|
|
|
|
c.Printf("Trip duration: %v\n", t.tripTime())
|
|
|
|
c.Printf("Current time: %v\n", time.Now())
|
|
|
|
c.Printf("Current time: %v\n", time.Now())
|
|
|
|
c.Printf("ETA: %v\n", t.eta())
|
|
|
|
c.Printf("ETA: %v\n", t.eta())
|
|
|
|
|
|
|
|
t.start.Leave(c)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (t *TravelState) Tick(c *Connection, frame int64) ConnectionState {
|
|
|
|
func (t *TravelState) Tick(c *Connection, frame int64) ConnectionState {
|
|
|
@ -60,6 +61,7 @@ func (t *TravelState) Tick(c *Connection, frame int64) ConnectionState {
|
|
|
|
|
|
|
|
|
|
|
|
func (t *TravelState) Exit(c *Connection) {
|
|
|
|
func (t *TravelState) Exit(c *Connection) {
|
|
|
|
c.Printf("You have arrived at %v.\n", t.dest)
|
|
|
|
c.Printf("You have arrived at %v.\n", t.dest)
|
|
|
|
|
|
|
|
t.dest.Arrive(c)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (t *TravelState) String() string {
|
|
|
|
func (t *TravelState) String() string {
|
|
|
|