From a8d086596f3b549d77128b89f0519267bbf35d9e Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 10 Mar 2018 13:07:17 +0900 Subject: :v: --- src/common/othello/core.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/common') diff --git a/src/common/othello/core.ts b/src/common/othello/core.ts index 62ec34f41c..fc432b2ced 100644 --- a/src/common/othello/core.ts +++ b/src/common/othello/core.ts @@ -49,6 +49,15 @@ export default class Othello { b: this.blackP, w: this.whiteP }]; + + // ゲームが始まった時点で片方の色の石しかないか、始まった時点で勝敗が決定するようなマップの場合がある + if (this.canPutSomewhere('black').length == 0) { + if (this.canPutSomewhere('white').length == 0) { + this.turn = null; + } else { + this.turn = 'white'; + } + } } /** -- cgit v1.2.3-freya