sync FreezeGamePlayer

This commit is contained in:
brenoepic 2022-04-29 22:24:54 -03:00
parent ca0eea33f6
commit fc82db6dec
2 changed files with 3 additions and 6 deletions

View File

@ -255,7 +255,7 @@ public class FreezeGame extends Game {
scoreboard.setExtradata("0"); scoreboard.setExtradata("0");
} }
int oldScore = Integer.valueOf(scoreboard.getExtradata()); int oldScore = Integer.parseInt(scoreboard.getExtradata());
if (oldScore == totalScore) if (oldScore == totalScore)
continue; continue;

View File

@ -38,7 +38,7 @@ public class FreezeGamePlayer extends GamePlayer {
} }
@Override @Override
public void addScore(int amount) { public synchronized void addScore(int amount) {
super.addScore(amount); super.addScore(amount);
if (amount > 0) { if (amount > 0) {
@ -122,10 +122,7 @@ public class FreezeGamePlayer extends GamePlayer {
} }
public boolean canGetFrozen() { public boolean canGetFrozen() {
if (this.isFrozen() || this.isProtected()) return !this.isFrozen() && !this.isProtected();
return false;
return true;
} }
public void addProtection() { public void addProtection() {