This commit is contained in:
syuilo
2018-03-07 22:25:26 +09:00
parent 81d0f59e4f
commit 4b7efd1f17
2 changed files with 7 additions and 1 deletions

View File

@ -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);