Compare commits

..

No commits in common. "b6b13581318a3b9c454daeeae6839c067eda1984" and "a9eae999f6f1eea3ec8824c1323914d4e453c16b" have entirely different histories.

2 changed files with 2 additions and 8 deletions

View File

@ -85,10 +85,7 @@ export function Board({ board, flip, prevMove, currMove, onStoneClick, onStoneMo
const isInteractive = (board && (typeof onStoneClick === 'function' || typeof onStoneMove === 'function')) ? ' interactive' : ''; const isInteractive = (board && (typeof onStoneClick === 'function' || typeof onStoneMove === 'function')) ? ' interactive' : '';
const WhiteTile = ({ id }) => { const WhiteTile = ({ id }) => {
id = (id !== currMove[1]) ? id : const stone = (id === currMove[1]) ? board[currMove[0]] : board[id];
currMove[0]; // the stone from currMove sarting position
const stone = board[id];
return ( return (
<div className={'Tile white' <div className={'Tile white'

View File

@ -14,10 +14,7 @@ export default function GameBoard({ username, getGame, onStoneClick, onStoneMove
(cellId) => onStoneClick(game.uuid, cellId); (cellId) => onStoneClick(game.uuid, cellId);
const optionalOnStoneMove = (typeof onStoneMove !== 'function' || isPushing) ? null : const optionalOnStoneMove = (typeof onStoneMove !== 'function' || isPushing) ? null :
(move) => { (move) => onStoneMove(game.uuid, move);
if (move[0] !== move[1] && game.board[move[1]] === undefined)
onStoneMove(game.uuid, move)
};
return ( return (
<div className='GameBoard'> <div className='GameBoard'>