mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 13:23:09 +02:00
Improve readability
This commit is contained in:
parent
221a7e6015
commit
3a9b0cce4a
1 changed files with 2 additions and 2 deletions
|
@ -224,8 +224,8 @@ export default class Othello {
|
||||||
|
|
||||||
// 座標が指し示す位置がボード外に出たとき
|
// 座標が指し示す位置がボード外に出たとき
|
||||||
if (this.opts.loopedBoard) {
|
if (this.opts.loopedBoard) {
|
||||||
if (x < 0 ) x = this.mapWidth - (-x);
|
if (x < 0 ) x = this.mapWidth - (-x);
|
||||||
if (y < 0 ) y = this.mapHeight - (-y);
|
if (y < 0 ) y = this.mapHeight - (-y);
|
||||||
if (x >= this.mapWidth ) x = x - this.mapWidth;
|
if (x >= this.mapWidth ) x = x - this.mapWidth;
|
||||||
if (y >= this.mapHeight) y = y - this.mapHeight;
|
if (y >= this.mapHeight) y = y - this.mapHeight;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue