fix: reset turnCount at the beginning of a new round
This commit is contained in:
parent
a69d8b916f
commit
213955bc37
@ -381,6 +381,7 @@ class GameLogic {
|
||||
* Verifies that a {@link Character} is alive.
|
||||
*/
|
||||
private static void requireAlive(Character entity) throws InvalidRequestException {
|
||||
//TODO: only characters are allowed here
|
||||
if(entity.hp.getValue() <= 0 || !entity.isActive()) {
|
||||
throw new InvalidRequestException();
|
||||
}
|
||||
@ -607,6 +608,7 @@ class GameLogic {
|
||||
ArrayList<Event> result = new ArrayList<>();
|
||||
|
||||
state.roundNumber++;
|
||||
state.turnNumber = 0;
|
||||
|
||||
if(state.roundNumber >= 1 && state.roundNumber <= 6) {
|
||||
result.addAll(handleGoose(state));
|
||||
|
Loading…
Reference in New Issue
Block a user