summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-10 13:07:17 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-10 13:07:17 +0900
commita8d086596f3b549d77128b89f0519267bbf35d9e (patch)
treee8b9208d787d0a6f02a1afd354bcb68fbbf238f3 /src/common
parentImplement othello map editing (diff)
downloadmisskey-a8d086596f3b549d77128b89f0519267bbf35d9e.tar.gz
misskey-a8d086596f3b549d77128b89f0519267bbf35d9e.tar.bz2
misskey-a8d086596f3b549d77128b89f0519267bbf35d9e.zip
:v:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/othello/core.ts9
1 files changed, 9 insertions, 0 deletions
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';
+ }
+ }
}
/**