Class: SampleAutomatedPlayer

Inherits:
Threesmodel::BaseGameAutomation show all
Defined in:
lib/solvers/sample_automated_player.rb

Instance Method Summary collapse

Methods inherited from Threesmodel::BaseGameAutomation

#initialize, #play_many, #score_filename, #update_highest_value_histogram

Constructor Details

This class inherits a constructor from Threesmodel::BaseGameAutomation

Instance Method Details

#playObject



6
7
8
9
10
11
12
13
14
# File 'lib/solvers/sample_automated_player.rb', line 6

def play
  while (not @game[:game_over]) do
    @game_controller.fold_right(@game[:id])
    @game_controller.fold_up(@game[:id])
    @game_controller.fold_left(@game[:id])
    @game = @game_controller.fold_down(@game[:id])
  end
  @game[:score]
end