This commit is contained in:
Aya Morisawa
2018-09-06 02:16:08 +09:00
committed by syuilo
parent b5ff2abdb9
commit 395cfa6108
9 changed files with 25 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
import { count } from "../../prelude/array";
// MISSKEY REVERSI ENGINE
/**
@@ -101,14 +103,14 @@ export default class Reversi {
* 黒石の数
*/
public get blackCount() {
return this.board.filter(x => x === BLACK).length;
return count(BLACK, this.board);
}
/**
* 白石の数
*/
public get whiteCount() {
return this.board.filter(x => x === WHITE).length;
return count(BLACK, this.board);
}
/**