summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-03-10 03:01:01 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-03-10 03:01:01 +0900
commit859ea79f31aa7297415d1dd65d5f3159eed43f16 (patch)
treeda874bc287b7a0e0d5a8fdf453fa2ff99be2c9e4 /src/common
parentv4064 (diff)
downloadmisskey-859ea79f31aa7297415d1dd65d5f3159eed43f16.tar.gz
misskey-859ea79f31aa7297415d1dd65d5f3159eed43f16.tar.bz2
misskey-859ea79f31aa7297415d1dd65d5f3159eed43f16.zip
Fix #1218
Diffstat (limited to 'src/common')
-rw-r--r--src/common/othello/core.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/othello/core.ts b/src/common/othello/core.ts
index 0b4cb1fc19..8a0af4d508 100644
--- a/src/common/othello/core.ts
+++ b/src/common/othello/core.ts
@@ -81,12 +81,12 @@ export default class Othello {
public transformPosToXy(pos: number): number[] {
const x = pos % this.mapWidth;
- const y = Math.floor(pos / this.mapHeight);
+ const y = Math.floor(pos / this.mapWidth);
return [x, y];
}
public transformXyToPos(x: number, y: number): number {
- return x + (y * this.mapHeight);
+ return x + (y * this.mapWidth);
}
/**