Class: RubyTictactoe::MinimizingPlayer

Inherits:
AlphaBetaPlayer show all
Defined in:
lib/alpha_beta_player.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



20
21
22
# File 'lib/alpha_beta_player.rb', line 20

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

#return_best_score(alpha, beta) ⇒ Object



24
25
26
# File 'lib/alpha_beta_player.rb', line 24

def return_best_score(alpha, beta)
  alpha
end