Skip to content

Commit

Permalink
start id at 0 instead of 1
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Dec 2, 2014
1 parent a0042b9 commit 97a95a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/game-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var GameGroup = function(gameId, relayServer, options) {
this.runtimeInfo = gameDB.getGameById(gameId);
this.relayServer = relayServer;
this.games = []; // first game is the "master"
this.nextGameId = 1;
this.nextGameId = 0; // start at 0 because it's easy to switch games with (gameNum + numGames + dir) % numGames
};

GameGroup.prototype.getGameById = function(id) {
Expand Down

0 comments on commit 97a95a0

Please sign in to comment.