Class: RubyTictactoe::MaximizingPlayer

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_alpha, #initialize

Constructor Details

This class inherits a constructor from RubyTictactoe::AlphaBetaPlayer

Instance Method Details

#get_beta(beta, score) ⇒ Object



99
100
101
# File 'lib/ai.rb', line 99

def get_beta(beta, score)
  score < beta ? score : beta
end

#return_best_score(alpha, beta) ⇒ Object



103
104
105
# File 'lib/ai.rb', line 103

def return_best_score(alpha, beta)
  beta
end