fix a bug

This commit is contained in:
lcw 2024-02-10 23:59:38 +08:00
parent b6b2e3142e
commit 688a2d8145

View File

@ -80,7 +80,8 @@ void GameBoard::turnUpdate() {
tile.unit += 1; tile.unit += 1;
if (tile.type == TileType::Swamp) { if (tile.type == TileType::Swamp) {
tile.unit -= 1; if (tile.unit > 0)
tile.unit -= 1;
if (tile.unit == 0) if (tile.unit == 0)
tile.owner = neutral_player; tile.owner = neutral_player;
} }