Reset wired game stats on initialization

This commit is contained in:
Alejandro 2019-08-11 12:13:04 +03:00
parent 732910e3fc
commit 1c387eff51
2 changed files with 12 additions and 0 deletions

View File

@ -80,6 +80,14 @@ public class GameTeam {
this.members.clear();
}
public void resetScores() {
for (GamePlayer player : this.members) {
if (player == null) continue;
player.reset();
}
}
public THashSet<GamePlayer> getMembers() {
return this.members;

View File

@ -15,6 +15,10 @@ public class WiredGame extends Game {
@Override
public void initialise() {
this.state = GameState.RUNNING;
for (GameTeam team : this.teams.values()) {
team.resetScores();
}
}
@Override