added some docs for task 13

Signed-off-by: Immanuel Alvaro Bhirawa <u7280427@anu.edu.au>
This commit is contained in:
Immanuel Alvaro Bhirawa 2023-05-09 10:53:28 +10:00
parent 56b29a3301
commit d99b63c82b

View File

@ -674,6 +674,9 @@ public class BlueLagoon {
// if the current player cannot play, go to the next player
int players = state.getNumPlayers();
// the case where there are multiple players, while the current player cannot play the move,
// move to the next player and skip each player once if that player cannot play a move.
while (!state.getCurrentPlayer().canPlay(state)) {
if (players == 1) break;
state.nextPlayer();
@ -683,20 +686,6 @@ public class BlueLagoon {
return state.toString();
}
// // Tally up the score
// else if (state.getCurrentPhase() == 'S') {
// state.scorePhase();
// }
// }
//
// // After the endPhase is over, move to the next player
// state.nextPlayer();
//
// // if the current player cannot play the move, move to the next player
// if (!state.getCurrentPlayer().canPlay(state)) state.nextPlayer();
//
// return state.toString();
// }
/**
* Given a state string, returns a valid move generated by your AI.
* <p>