remove dot data from game end state
This commit is contained in:
parent
692a8b1400
commit
a8119bb194
3 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ const Board = (props) => {
|
|||
const posY = (i % boardSize) + 1;
|
||||
const pointData = board[`${posX}-${posY}`];
|
||||
const dotData =
|
||||
meta && meta.turn === 0
|
||||
meta && meta.turn === 0 && !meta.winner
|
||||
? meta?.territory[`${posX}-${posY}`]
|
||||
: game.turn || meta?.turn;
|
||||
boardPoints.push(
|
||||
|
|
|
@ -71,6 +71,7 @@ const Game = (props) => {
|
|||
};
|
||||
|
||||
const handlePassClick = (player) => {
|
||||
if (state?.meta && state?.meta?.winner) return;
|
||||
if (state?.meta && state?.meta?.turn === 0) {
|
||||
const action = {
|
||||
type: "SOCKET",
|
||||
|
|
|
@ -104,7 +104,6 @@ function gameResign(state, action) {
|
|||
}
|
||||
|
||||
function gameEnd(state, action) {
|
||||
console.log(action);
|
||||
const { winner, score } = action.body.meta;
|
||||
return { ...state, meta: { ...state.meta, winner, score } };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue