maybe don't respond twice

This commit is contained in:
stryan 2022-03-07 14:49:02 -05:00
parent 86883cff71
commit 38c21448cc

1
api.go
View File

@ -32,6 +32,7 @@ func (a *API) NewGame(res http.ResponseWriter, req *http.Request) {
initDummy(g.simulator)
}
respondWithJSON(res, http.StatusOK, newGameResp{i, "red"})
return
}
if !g.bluePlayer.Ready {
g.bluePlayer.Ready = true