Merge pull request #14 from jhalitaksoy/fix/game-model

fix: update gameUsersConnectionInfo onGameMove
This commit is contained in:
Halit Aksoy 2022-08-02 08:10:57 +03:00 committed by GitHub
commit 958aa9d0f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,7 @@ export class GameManager {
if (game) {
try {
game.mancalaGame.moveByPlayerPit(userKey, gameMove.index);
game.gameUsersConnectionInfo = this.getGameUsersConnectionInfo(game);
this.rtmt.sendMessage(game.mancalaGame.player1Id, channel_on_game_update, game);
this.rtmt.sendMessage(game.mancalaGame.player2Id, channel_on_game_update, game);
if (game.mancalaGame.state == "ended") {