Skip to content
Snippets Groups Projects

Fixed an issue where games werent progressing as planned

Merged Tobias Ingebrigt Ørstad requested to merge 95-backend-cleanup into dev
2 files
+ 5
3
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 3
2
@@ -449,7 +449,7 @@ function roundcheck(client, tournament, roundid) {
@@ -449,7 +449,7 @@ function roundcheck(client, tournament, roundid) {
// fetched the round objects of the active round
// fetched the round objects of the active round
let activePlayer;
let activePlayer;
for (let i = 0; i < rounds.length; i++) {
for (let i = 0; i < rounds.length; i++) {
if (rounds[i]._id === roundid) {
if (rounds[i]._id.str == roundid.str) {
activePlayer = rounds[i].playerId;
activePlayer = rounds[i].playerId;
break;
break;
}
}
@@ -526,7 +526,8 @@ function roundcheck(client, tournament, roundid) {
@@ -526,7 +526,8 @@ function roundcheck(client, tournament, roundid) {
tourny = result.value;
tourny = result.value;
const game =
const game =
tourny.games[
tourny.games[
tourny.currentRound % tourny.games.length
(tourny.currentRound % tourny.games.length) -
 
1
];
];
const date = new Date();
const date = new Date();
date.setTime(
date.setTime(
Loading