Skip to content

Commit

Permalink
Update lib/engine/game/g_18_norway/steps/token.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Oliver Burnett-Hall <olly@burnett-hall.co.uk>
  • Loading branch information
patrikolesen and ollybh authored Sep 17, 2024
1 parent 4753794 commit 7b397d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/engine/game/g_18_norway/steps/token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ def available_hex(entity, hex)
end

def harbor_available?(entity, hex)
city = @game.harbor_city_coordinates(hex.id)
return false if city.nil?
other_hex = @game.hex_by_id(@game.harbor_city_coordinates(hex.id))
return false unless other_hex

other_hex = @game.hex_by_id(city)

@game.ferry_graph.reachable_hexes(entity)[other_hex] ||
@game.token_graph_for_entity(entity).reachable_hexes(entity)[other_hex]
Expand Down

0 comments on commit 7b397d3

Please sign in to comment.