diff --git a/api.go b/api.go index 2b8cf15..60be099 100644 --- a/api.go +++ b/api.go @@ -81,7 +81,15 @@ func (a *API) GetGame(res http.ResponseWriter, req *http.Request) { } log.Println("sending game state") - respondWithJSON(res, http.StatusOK, gameResp{s.getBoard(p)}) + rotatedBoard := s.getBoard(p) + i := 0 + temp := rotatedBoard[0] + for ; i < len(rotatedBoard)-1; i++ { + rotatedBoard[i] = rotatedBoard[i+1] + } + + rotatedBoard[i] = temp + respondWithJSON(res, http.StatusOK, rotatedBoard) return }