Class: TicTacToe::AIRules::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/ttt/ai/ai_factory.rb

Class Method Summary collapse

Class Method Details

.get(move) ⇒ Object



4
5
6
7
8
9
# File 'lib/ttt/ai/ai_factory.rb', line 4

def self.get(move)
  case move[:difficulty]
  when :unbeatable_ai
    UnbeatableAI.make_move(move[:board], move[:mark])
  end
end