sort the all bots list
This commit is contained in:
@@ -160,6 +160,7 @@ func (g *game) tick(payload *Boardstate) int {
|
||||
func (g *game) send_update(payload *Boardstate) {
|
||||
// Ensure that the robots are always sent in a consistent order
|
||||
sort.Sort(RobotSorter{Robots: payload.OtherRobots})
|
||||
sort.Sort(AllRobotSorter{Robots: payload.AllBots})
|
||||
|
||||
for p := range g.players {
|
||||
// Copy the payload but only add the robots in scanner range
|
||||
|
||||
Reference in New Issue
Block a user