Bugfix moneycallback when buying tower
Some checks failed
Quality Check / Validate OAS (push) Successful in 30s
Quality Check / Static Analysis (push) Failing after 53s
Quality Check / Linting (push) Successful in 57s
Quality Check / Testing (push) Successful in 57s

This commit is contained in:
Kevin Schmidt 2025-03-12 13:18:40 +01:00
parent 6d536a3ad1
commit 3f4b952916

View file

@ -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);