remove dot data from game end state

This commit is contained in:
sorrelbri 2020-06-20 17:05:39 -07:00
parent 692a8b1400
commit a8119bb194
3 changed files with 2 additions and 2 deletions

View file

@ -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(

View file

@ -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",

View file

@ -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 } };
}