Skip to content

Commit

Permalink
Merge branch 'develop' into SP24-778-Animering-av-knapper
Browse files Browse the repository at this point in the history
  • Loading branch information
filvanh authored Sep 30, 2024
2 parents 6838518 + 8c4b518 commit 0e1300b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class GameIntermediateResultComponent implements OnInit, OnDestroy {

this.multiplayerService.getLabel(false).subscribe((res) => {
if (res) {
this.gameStateService.nextRound();
this.gameStateService.goToPage(GAMESTATE.showWord);
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export class GameWordToDrawComponent implements OnInit, OnDestroy {
}
}
if (this.isMultiPlayer) {
this.gameStateService.updateRoundNumber();
const player = this.multiplayerService.stateInfo.player_nr;
this.playernr = player === 'player_1' ? '1' : '2';
this.guessUsed = this.drawingService.guessUsed;
Expand Down
8 changes: 6 additions & 2 deletions src/app/game/services/game-state-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@ export class GameStateService {
}

startGame() {
this._currentRound.next(1);
if (this.isSingleplayer()) {
this._currentRound.next(1);
}
this._currentPage.next(GAMESTATE.showWord);
}

replayGame() {
this._currentRound.next(1);
if (this.isSingleplayer()) {
this._currentRound.next(1);
}
this._currentPage.next(GAMESTATE.difficultyPicker);
}

Expand Down

0 comments on commit 0e1300b

Please sign in to comment.