Skip to content

Commit

Permalink
Merge pull request #284 from cking20/bugFixing
Browse files Browse the repository at this point in the history
AI get reset when frontend reconnects
  • Loading branch information
James-Aric authored Apr 28, 2018
2 parents 024cc35 + a486cc5 commit a73cb12
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,14 @@ public void call(Object... args) {
@Override
public void call(Object... args) {
System.out.println("reconnect");
for(int i = 0; i < 4; i++){
if(produceAI) {
theAIs[i] = new AI();
thePlayers[i] = theAIs[i];
}else {
thePlayers[i] = new Player();
}
}
}
}).on("removeAI", new Emitter.Listener() {
@Override
Expand Down

0 comments on commit a73cb12

Please sign in to comment.