New: AI Generated GUI
This commit is contained in:
@@ -25,9 +25,14 @@ public class Cat extends Player{
|
||||
int posX = Integer.parseInt(inputArr[0]);
|
||||
int posY = Integer.parseInt(inputArr[1]);
|
||||
|
||||
movePlayer(posX, posY);
|
||||
}
|
||||
|
||||
public void movePlayer(int posX, int posY) throws IOException {
|
||||
if (!gArea.validatePosition(new Position(posX,posY))) {
|
||||
System.out.println("Invalid input!");
|
||||
System.exit(1);
|
||||
if (scanner != null && scanner.hasNext()) System.exit(1); // Only exit if in console mode
|
||||
return;
|
||||
}
|
||||
|
||||
Position p = gArea.playingField[posX][posY];
|
||||
|
||||
Reference in New Issue
Block a user