Merge pull request #15 from sorrelbri/patch/game-service
patch Game service
This commit is contained in:
commit
1c470ffec0
1 changed files with 3 additions and 2 deletions
|
@ -266,11 +266,12 @@ const Game = ({ gameData = {}, gameRecord = [] } = {}) => {
|
||||||
if (this.pass > 1) {
|
if (this.pass > 1) {
|
||||||
return { ...this, success: false };
|
return { ...this, success: false };
|
||||||
}
|
}
|
||||||
if (x === 0) return game.submitPass(player);
|
|
||||||
|
|
||||||
let success = false;
|
let success = false;
|
||||||
let game = this;
|
let game = this;
|
||||||
|
|
||||||
|
if (x === 0) return game.submitPass(player);
|
||||||
|
|
||||||
// if checkMove has not been run, determine legality
|
// if checkMove has not been run, determine legality
|
||||||
if (!game.move) {
|
if (!game.move) {
|
||||||
game = game.checkMove({ player, pos: { x, y } });
|
game = game.checkMove({ player, pos: { x, y } });
|
||||||
|
|
Loading…
Reference in a new issue