Implement othello map editing

This commit is contained in:
syuilo
2018-03-10 12:48:41 +09:00
parent 13b27b15d9
commit 59fbf693ed
2 changed files with 30 additions and 22 deletions

View File

@@ -69,6 +69,7 @@ export default class Othello {
* 黒石の比率
*/
public get blackP() {
if (this.blackCount == 0 && this.whiteCount == 0) return 0;
return this.blackCount / (this.blackCount + this.whiteCount);
}
@@ -76,6 +77,7 @@ export default class Othello {
* 白石の比率
*/
public get whiteP() {
if (this.blackCount == 0 && this.whiteCount == 0) return 0;
return this.whiteCount / (this.blackCount + this.whiteCount);
}