Class: AIPlayer

Inherits:
Player 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, #get_alpha, #get_beta, #initialize

Constructor Details

This class inherits a constructor from Player

Instance Method Details

#make_move(board) ⇒ Object



23
24
25
26
27
# File 'lib/player.rb', line 23

def make_move(board)
  ai = AI.new(self)
  cell = ai.computer_move(board, self)
  add_marker(board, cell)
end