modify war surrender town/nation rework

This commit is contained in:
Aubri Seebauer committed 2023-04-23 13:30:16 -04:00
1 parent 93aff6e642
commit 55b1f529d2
2 files changed
+39 -11

No files matched your search

@@ -86,8 +86,10 @@ public class War {
* @param nation - Nation to surrender
*/
public void surrenderNation(Nation nation) {
for (Town town : nation.getTowns()) {
surrenderTown(town.getName());
if(nation != null) {
for (Town town : nation.getTowns()) {
surrenderTown(town.getName());
}
}
}
@@ -146,7 +148,7 @@ public class War {
public int getSide(Town town) {
return getSide(town.getName());
}
public String getName() {
return this.name;
}