From 6159d4de78e21f3e77d21d7a0ec0e07c29e17391 Mon Sep 17 00:00:00 2001 From: yzyray Date: Tue, 8 Dec 2020 11:58:51 +0800 Subject: [PATCH] fix wrong getCoord --- src/main/java/featurecat/lizzie/rules/Board.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/featurecat/lizzie/rules/Board.java b/src/main/java/featurecat/lizzie/rules/Board.java index 8d528fa36..f51fe40ab 100644 --- a/src/main/java/featurecat/lizzie/rules/Board.java +++ b/src/main/java/featurecat/lizzie/rules/Board.java @@ -88,8 +88,8 @@ public static int getIndex(int x, int y) { } public static int[] getCoord(int index) { - int y = index % Board.boardHeight; - int x = (index - y) / Board.boardHeight; + int y = index % Board.boardWidth; + int x = (index - y) / Board.boardWidth; return new int[] {x, y}; }