Class: RubyTictactoe::MinimizingPlayer

Inherits:
AlphaBetaPlayer show all
Defined in:
lib/ai.rb

Instance Attribute Summary

Attributes inherited from AlphaBetaPlayer

#marker, #opponent

Instance Method Summary collapse

Methods inherited from AlphaBetaPlayer

#get_beta, #initialize

Constructor Details

This class inherits a constructor from RubyTictactoe::AlphaBetaPlayer

Instance Method Details

#get_alpha(alpha, score) ⇒ Object



89
90
91
# File 'lib/ai.rb', line 89

def get_alpha(alpha, score)
  score > alpha ? score : alpha
end

#return_best_score(alpha, beta) ⇒ Object



93
94
95
# File 'lib/ai.rb', line 93

def return_best_score(alpha, beta)
  alpha
end