From 859ea79f31aa7297415d1dd65d5f3159eed43f16 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 10 Mar 2018 03:01:01 +0900 Subject: [PATCH] Fix #1218 --- src/common/othello/core.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/othello/core.ts b/src/common/othello/core.ts index 0b4cb1fc1..8a0af4d50 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); } /**