diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-10 12:48:41 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-10 12:48:41 +0900 |
| commit | 59fbf693ed05082e9dcb1cd3731116d83d9cfc10 (patch) | |
| tree | 37dfe5e6a313dbb4730a542217b1be6ec0669a18 /src/common | |
| parent | Merge pull request #1224 from syuilo/othello-parallel-map (diff) | |
| download | misskey-59fbf693ed05082e9dcb1cd3731116d83d9cfc10.tar.gz misskey-59fbf693ed05082e9dcb1cd3731116d83d9cfc10.tar.bz2 misskey-59fbf693ed05082e9dcb1cd3731116d83d9cfc10.zip | |
Implement othello map editing
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/othello/core.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/othello/core.ts b/src/common/othello/core.ts index 8a0af4d508..62ec34f41c 100644 --- a/src/common/othello/core.ts +++ b/src/common/othello/core.ts @@ -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); } |