Class: IFearDownFoldsPlayer
- Inherits:
-
Threesmodel::BaseGameAutomation
- Object
- Threesmodel::BaseGameAutomation
- IFearDownFoldsPlayer
- Defined in:
- lib/solvers/i_fear_down_folds_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
#play ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/solvers/i_fear_down_folds_player.rb', line 5 def play while (not @game[:game_over]) do if (@game_board_folder.can_fold_up?(@game[:game]) or @game_board_folder.can_fold_left?(@game[:game]) or @game_board_folder.can_fold_right?(@game[:game])) then @game_controller.fold_up(@game[:id]) @game_controller.fold_right(@game[:id]) @game = @game_controller.fold_left(@game[:id]) else @game = @game_controller.fold_down(@game[:id]) end end @game[:score] end |