First pass of multibot support
This commit is contained in:
+7
-4
@@ -83,11 +83,14 @@ func listGames(w http.ResponseWriter, req *http.Request) {
|
||||
ids := make([]gl, 0)
|
||||
for id, g := range games.m {
|
||||
players := make([]pout, 0)
|
||||
// TODO - players instead of robots?
|
||||
for p, _ := range g.players {
|
||||
players = append(players, pout{
|
||||
Name: p.Robot.Name,
|
||||
Id: p.Robot.Id,
|
||||
})
|
||||
for _, r := range p.Robots {
|
||||
players = append(players, pout{
|
||||
Name: r.Name,
|
||||
Id: r.Id,
|
||||
})
|
||||
}
|
||||
}
|
||||
ids = append(ids, gl{
|
||||
Id: id,
|
||||
|
||||
Reference in New Issue
Block a user