diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-04-04 08:46:54 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-04-04 08:46:54 +0900 |
| commit | d4a630902d8d250b67fcd0ce2b49240786b40368 (patch) | |
| tree | b87395691e52e3b86ce40196993d492c694c5e79 /src/games | |
| parent | enhance(server): Log error message when internal error occured (diff) | |
| download | misskey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.gz misskey-d4a630902d8d250b67fcd0ce2b49240786b40368.tar.bz2 misskey-d4a630902d8d250b67fcd0ce2b49240786b40368.zip | |
refactor: Use ===
Diffstat (limited to 'src/games')
| -rw-r--r-- | src/games/reversi/core.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/games/reversi/core.ts b/src/games/reversi/core.ts index 09d23e2b70..e7ae1af7a2 100644 --- a/src/games/reversi/core.ts +++ b/src/games/reversi/core.ts @@ -226,10 +226,10 @@ export default class Reversi { // 座標が指し示す位置がボード外に出たとき if (this.opts.loopedBoard && this.transformXyToPos( (x = ((x % this.mapWidth) + this.mapWidth) % this.mapWidth), - (y = ((y % this.mapHeight) + this.mapHeight) % this.mapHeight)) == initPos) + (y = ((y % this.mapHeight) + this.mapHeight) % this.mapHeight)) === initPos) // 盤面の境界でループし、自分が石を置く位置に戻ってきたとき、挟めるようにしている (ref: Test4のマップ) return found; - else if (x == -1 || y == -1 || x == this.mapWidth || y == this.mapHeight) + else if (x === -1 || y === -1 || x === this.mapWidth || y === this.mapHeight) return []; // 挟めないことが確定 (盤面外に到達) const pos = this.transformXyToPos(x, y); |