summaryrefslogtreecommitdiff
path: root/src/common/othello.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-07 22:25:26 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-07 22:25:26 +0900
commit4b7efd1f17e8029f352ea098d7c7b2898bf8b5ea (patch)
tree8afc4ca0f1ddf6ebac1c61aca44e540cec874197 /src/common/othello.ts
parentv4010 (diff)
downloadmisskey-4b7efd1f17e8029f352ea098d7c7b2898bf8b5ea.tar.gz
misskey-4b7efd1f17e8029f352ea098d7c7b2898bf8b5ea.tar.bz2
misskey-4b7efd1f17e8029f352ea098d7c7b2898bf8b5ea.zip
:v:
Diffstat (limited to 'src/common/othello.ts')
-rw-r--r--src/common/othello.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/othello.ts b/src/common/othello.ts
index 1057e6b9a4..5d95fd2fe1 100644
--- a/src/common/othello.ts
+++ b/src/common/othello.ts
@@ -29,6 +29,8 @@ export default class Othello {
});
}
+ public prevPos = -1;
+
public get blackCount() {
return this.board.filter(s => s == 'black').length;
}
@@ -59,6 +61,7 @@ export default class Othello {
* 石を配置します
*/
public set2(color, x, y) {
+ this.prevPos = x + (y * 8);
this.write(color, x, y);
const reverses = this.getReverse(color, x, y);