Class: Tictactoe::DumbPlayer

Inherits:
Player
  • Object
show all
Defined in:
lib/tictactoe/dumbplayer.rb

Instance Attribute Summary

Attributes inherited from Player

#mark

Instance Method Summary collapse

Methods inherited from Player

#finish, #initialize

Constructor Details

This class inherits a constructor from Tictactoe::Player

Instance Method Details

#move(board) ⇒ Object



7
8
9
10
# File 'lib/tictactoe/dumbplayer.rb', line 7

def move( board )
  moves = board.moves
  moves[rand(moves.size)]
end