Bugfix moneycallback when buying tower
This commit is contained in:
parent
6d536a3ad1
commit
3f4b952916
1 changed files with 2 additions and 0 deletions
|
@ -60,12 +60,14 @@ public class Match {
|
|||
throw new InvalidPlacementException(InvalidPlacementReason.LOCATION_USED);
|
||||
}
|
||||
removeMoney(player, TOWER_PRICE);
|
||||
player1MoneyCallback.call(player1, player1Money);
|
||||
player1Map[x][y] = tower;
|
||||
} else {
|
||||
if (player2Map[x][y] != null) {
|
||||
throw new InvalidPlacementException(InvalidPlacementReason.LOCATION_USED);
|
||||
}
|
||||
removeMoney(player, TOWER_PRICE);
|
||||
player2MoneyCallback.call(player2, player2Money);
|
||||
player2Map[x][y] = tower;
|
||||
}
|
||||
return getOpponent(player);
|
||||
|
|
Loading…
Add table
Reference in a new issue