Class: Computer
- Includes:
- AI
- Defined in:
- lib/sapphire-chess/player.rb
Constant Summary
Constants included from OpeningsAndDefenses
OpeningsAndDefenses::DEFENSES, OpeningsAndDefenses::OPENINGS
Instance Attribute Summary collapse
-
#depth ⇒ Object
depth: Levels of AI#minimax recursion.
Attributes inherited from Player
#board, #color, #history, #last_move
Instance Method Summary collapse
Methods inherited from Player
Methods included from CastlingRights
Constructor Details
This class inherits a constructor from Player
Instance Attribute Details
#depth ⇒ Object
depth: Levels of AI#minimax recursion. Deeper means harder (computer can think ‘depth` turns ahead) See Engine#set_difficulty
34 35 36 |
# File 'lib/sapphire-chess/player.rb', line 34 def depth @depth end |
Instance Method Details
#select_move ⇒ Object
36 37 38 |
# File 'lib/sapphire-chess/player.rb', line 36 def select_move computer_chooses_move end |