1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-05 02:08:56 +09:00

Remove whiteP and blackP from Reversi (#3736)

This commit is contained in:
Aya Morisawa 2019-01-26 11:30:30 +09:00 committed by syuilo
parent 6bbc6a80b2
commit 95d4937e16

View File

@ -100,20 +100,6 @@ export default class Reversi {
return count(WHITE, this.board);
}
/**
*
*/
public get blackP() {
return this.blackCount == 0 && this.whiteCount == 0 ? 0 : this.blackCount / (this.blackCount + this.whiteCount);
}
/**
*
*/
public get whiteP() {
return this.blackCount == 0 && this.whiteCount == 0 ? 0 : this.whiteCount / (this.blackCount + this.whiteCount);
}
public transformPosToXy(pos: number): number[] {
const x = pos % this.mapWidth;
const y = Math.floor(pos / this.mapWidth);