module Berlin::AI::Game::Internal

Public Class Methods

included(base) click to toggle source
# File lib/ai/game_internal.rb, line 45
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

reset!() click to toggle source
# File lib/ai/game_internal.rb, line 58
def reset!
  @moves = []
  @map.nodes.each(&:reset!)
end
update(current_turn, state) click to toggle source
# File lib/ai/game_internal.rb, line 49
def update(current_turn, state)
  # Update turn infos
  @current_turn = current_turn.to_i
  @turns_left   = @maximum_number_of_turns - @current_turn
  
  # Update map state
  @map.update(state)
end