Class: RubyTictactoe::ComputerPlayer

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

Instance Attribute Summary

Attributes inherited from Player

#marker, #opponent

Instance Method Summary collapse

Methods inherited from Player

#add_marker, #initialize

Constructor Details

This class inherits a constructor from RubyTictactoe::Player

Instance Method Details

#make_move(board) ⇒ Object



27
28
29
30
# File 'lib/player.rb', line 27

def make_move(board)
  cell = board.random_cell
  add_marker(board, cell)
end