wonder's placement requirement checker
This commit is contained in:
parent
686de54f56
commit
067dc983d3
2 changed files with 4 additions and 2 deletions
|
|
@ -111,7 +111,9 @@ impl City {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
//todo! use wonder's placement checker
|
||||
if let Some(placement_requirement) = &wonder.placement_requirement {
|
||||
return placement_requirement(&self.position);
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ impl PlayingAction {
|
|||
let player = &mut game.players[player_index];
|
||||
let starting_city = player
|
||||
.get_city(&starting_city_position)
|
||||
.expect("player should have position");
|
||||
.expect("Illegal action");
|
||||
if matches!(&city_piece, Obelisk)
|
||||
|| starting_city.player_index != player_index
|
||||
|| !player.resources().can_afford(&range_boost_cost)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue