task 9 and 10: Added using state class
This commit is contained in:
@@ -76,11 +76,15 @@ public class StateTest {
|
||||
|
||||
// Test endPhase
|
||||
while (!state.isPhaseOver()) {
|
||||
if (!state.getCurrentPlayer().canPlay(state)) state.nextPlayer();
|
||||
if (!state.getCurrentPlayer().canPlay(state)) {
|
||||
System.out.println("Player " + state.getCurrentPlayerID() + " can't play");
|
||||
state.nextPlayer();
|
||||
}
|
||||
state.getCurrentPlayer().doRandomMove(state);
|
||||
}
|
||||
state.scorePhase();
|
||||
System.out.println(state);
|
||||
System.out.println(state.getCurrentPhase());
|
||||
System.out.println(state.scoreString());
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user