Lorenz Hohmann
3 years ago
3 changed files with 44 additions and 45 deletions
-
34src/main/java/de/tims/fleetstorm/GameManager.java
-
37src/main/java/de/tims/fleetstorm/gui/Logic.java
-
18src/test/java/de/tims/fleetstorm/gui/LogicTest.java
@ -1,34 +0,0 @@ |
|||
package de.tims.fleetstorm; |
|||
|
|||
import de.tims.fleetstorm.matchfield.Matchfield; |
|||
|
|||
public class GameManager { |
|||
|
|||
private int gameState; |
|||
private Matchfield matchfield; |
|||
private int matchfieldSize = 10; |
|||
private boolean playerMove = true; |
|||
|
|||
public static final int PREPARATION = 1; |
|||
public static final int RUNNING = 2; |
|||
public static final int OVER = 3; |
|||
|
|||
public void start() { |
|||
this.gameState = GameManager.PREPARATION; |
|||
|
|||
this.matchfield = new Matchfield(matchfieldSize); |
|||
} |
|||
|
|||
public void nextMove() { |
|||
this.playerMove = !this.playerMove; |
|||
} |
|||
|
|||
public int getGameState() { |
|||
return gameState; |
|||
} |
|||
|
|||
public boolean isPlayerMove() { |
|||
return playerMove; |
|||
} |
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue