Skip to content

Commit

Permalink
fix double o error
Browse files Browse the repository at this point in the history
  • Loading branch information
BenA authored and BenA committed Jan 9, 2024
1 parent 9c9b4d6 commit f899f49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/engine/game/g_18_esp/game.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class Game < Game::Base

P5_HEX = 'H12'

DOUBLE_HEX = %w[D6 C31 J20].freeze

P5_DISCOUNT = 40

BASE_MINE_BONUS = { yellow: 30, green: 20, brown: 10, gray: 0 }.freeze
Expand Down Expand Up @@ -759,7 +761,8 @@ def check_distance(route, visits)

raise GameError, 'Route can only use one mountain pass' if route.hexes.count { |hex| mountain_pass_token_hex?(hex) } > 1

raise GameError, 'Route visits same hex twice' if route.hexes.size != route.hexes.uniq.size
hexes = route.hexes.reject { |h| self.class::DOUBLE_HEX.include?(h.name) }
raise GameError, 'Route visits same hex twice' if hexes.size != hexes.uniq.size

if route.train.id == '2P-0' && !@perm2_ran_aranjuez && route.hexes.none? do |hex|
hex.id == ARANJUEZ_HEX
Expand Down

0 comments on commit f899f49

Please sign in to comment.