Class: NeuroGammon::LazyPlayer
- Inherits:
-
BasePlayer
- Object
- BasePlayer
- NeuroGammon::LazyPlayer
- Defined in:
- lib/neuro_gammon/lazy_player.rb
Instance Attribute Summary
Attributes inherited from BasePlayer
Instance Method Summary collapse
-
#initialize ⇒ LazyPlayer
constructor
A new instance of LazyPlayer.
- #suggest_move(board, dice, colour) ⇒ Object
Constructor Details
#initialize ⇒ LazyPlayer
Returns a new instance of LazyPlayer.
11 12 13 |
# File 'lib/neuro_gammon/lazy_player.rb', line 11 def initialize super end |
Instance Method Details
#suggest_move(board, dice, colour) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/neuro_gammon/lazy_player.rb', line 15 def suggest_move board,dice,colour valid=board.valid_moves(colour, dice) if (valid.size>0) move=valid.first return move else return nil end end |