diff --git a/backend/api/rounds.js b/backend/api/rounds.js index 0099185f7652d1f893c4dbe1e7f0161aaafbb0d7..53423a2a9b2eb7c70aa5d0504eee06c69a7b3fe2 100644 --- a/backend/api/rounds.js +++ b/backend/api/rounds.js @@ -526,8 +526,8 @@ function roundcheck(client, tournament, roundid) { tourny = result.value; const game = tourny.games[ - (tourny.currentRound % tourny.games.length) - - 1 + (tourny.currentRound - 1) % + tourny.games.length ]; const date = new Date(); date.setTime( diff --git a/backend/api/tournament.js b/backend/api/tournament.js index 1a195610fb9c21911645c0a5e05c79f58985a0fe..4a34e4992dcf828c188225c14820c847d7138d73 100644 --- a/backend/api/tournament.js +++ b/backend/api/tournament.js @@ -510,10 +510,10 @@ function roundcheck(client, tournament) { if (result.value) { // If the tournament has more rounds left tourny = result.value; - const game = // Finds the next game of the round + const game = tourny.games[ - (tourny.currentRound % tourny.games.length) - - 1 + (tourny.currentRound - 1) % + tourny.games.length ]; const date = new Date(); date.setTime(