func evac(ship *dtl.Ship, escapeSector *dtl.Sector) error { for { if ship.CanTravel() { fmt.Printf("Evaccing to %s\n", escapeSector.Name) return ship.Travel(escapeSector) } time.Sleep(1 * time.Second) } }
func travel(ship *dtl.Ship, sector *dtl.Sector) error { for { if ship.CanTravel() { fmt.Printf("Travelling to %s\n", sector.Name) return ship.Travel(sector) } time.Sleep(1 * time.Second) } }