Change coordinate values from (0 -> n-1) to (1, n)
This commit is contained in:
@@ -45,14 +45,14 @@ public class ConsoleRenderer extends GomokuRenderer {
|
|||||||
System.out.print(" " + c + " |");
|
System.out.print(" " + c + " |");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println(" " + i);
|
System.out.println(" " + (i + 1));
|
||||||
System.out.println(horizontalLine);
|
System.out.println(horizontalLine);
|
||||||
}
|
}
|
||||||
System.out.print("X");
|
System.out.print("X");
|
||||||
for (int i = 0; i < width; i++) {
|
for (int i = 1; i <= width; i++) {
|
||||||
System.out.print(String.format(" %-2d ", i));
|
System.out.print(String.format(" %-2d ", i));
|
||||||
}
|
}
|
||||||
System.out.println("");
|
System.out.println();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class Human extends Player {
|
|||||||
}
|
}
|
||||||
} while (!pass);
|
} while (!pass);
|
||||||
|
|
||||||
cell = board.get(x, y);
|
cell = board.get(x - 1, y - 1);
|
||||||
pass = cell == null ? false : cell.isPlayable();
|
pass = cell == null ? false : cell.isPlayable();
|
||||||
if (!pass) {
|
if (!pass) {
|
||||||
System.out.println("Cette case n'est pas jouable !");
|
System.out.println("Cette case n'est pas jouable !");
|
||||||
|
|||||||
Reference in New Issue
Block a user