Class: Tictactoe::DumbPlayer
- Defined in:
- lib/tictactoe/dumbplayer.rb
Instance Attribute Summary
Attributes inherited from Player
Instance Method Summary collapse
Methods inherited from Player
Constructor Details
This class inherits a constructor from Tictactoe::Player
Instance Method Details
#move(board) ⇒ Object
5 6 7 8 |
# File 'lib/tictactoe/dumbplayer.rb', line 5 def move( board ) moves = board.moves moves[rand(moves.size)] end |