Class: Model::MoveStrategy
- Inherits:
-
Object
- Object
- Model::MoveStrategy
- Defined in:
- lib/tic_tac_toe/model/move_strategy.rb
Defined Under Namespace
Classes: EvaluatedBoard
Instance Method Summary collapse
Instance Method Details
#select_move(game_tree) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/tic_tac_toe/model/move_strategy.rb', line 23 def select_move(game_tree) @team = game_tree.current_team evaluated_game_tree = min_max(game_tree, 9, true, -Float::INFINITY, Float::INFINITY) evaluated_game_tree.game_tree.previous_move end |