small code explainer
This commit is contained in:
parent
a9eae999f6
commit
0e6e896851
@ -85,7 +85,10 @@ export function Board({ board, flip, prevMove, currMove, onStoneClick, onStoneMo
|
||||
const isInteractive = (board && (typeof onStoneClick === 'function' || typeof onStoneMove === 'function')) ? ' interactive' : '';
|
||||
|
||||
const WhiteTile = ({ id }) => {
|
||||
const stone = (id === currMove[1]) ? board[currMove[0]] : board[id];
|
||||
id = (id !== currMove[1]) ? id :
|
||||
currMove[0]; // the stone from currMove sarting position
|
||||
|
||||
const stone = board[id];
|
||||
|
||||
return (
|
||||
<div className={'Tile white'
|
||||
|
Loading…
Reference in New Issue
Block a user