mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 14:07:38 -07:00
Remove whiteP and blackP from Reversi (#3736)
This commit is contained in:
parent
ef2ff22cd9
commit
8c9fe1093e
1 changed files with 0 additions and 14 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue