Created
July 25, 2018 15:29
-
-
Save cazala/4ead05f889e7d17f960e1a159d61e867 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (elementId === 'register-white') { | |
if (!playerBlack) { | |
store.dispatch(initSquares()) // let the first player who registers init the board | |
} | |
store.dispatch(registerPlayer(this.id, true)) | |
} else if (elementId === 'register-black') { | |
if (!playerWhite) { | |
store.dispatch(initSquares()) // let the first player who registers init the board | |
} | |
store.dispatch(registerPlayer(this.id, false)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment