working state

This commit is contained in:
sparshg
2024-09-20 03:05:17 +05:30
parent 9cc0defa05
commit b994cd7439
4 changed files with 30 additions and 7 deletions

View File

@@ -25,7 +25,7 @@ export class State {
callback(this.playerBoard.board);
});
this.socket.on('turnover', (id) => {
this.turn = id != this.socket.id;
this.turn = id == this.socket.id;
this.phase = this.turn ? 'selfturn' : 'otherturn';
});
this.socket.on('attacked', ({ by, at, hit, sunk }) => {