Class: RandomAI

Inherits:
AI
  • Object
show all
Defined in:
lib/ttt-cli/strategies/random_ai.rb

Instance Attribute Summary

Attributes inherited from AI

#best_move

Instance Method Summary collapse

Methods inherited from AI

create, #initialize

Constructor Details

This class inherits a constructor from AI

Instance Method Details

#move_generateObject



4
5
6
# File 'lib/ttt-cli/strategies/random_ai.rb', line 4

def move_generate
  @board.empty_cells.sample
end