Method: Alpha::Alpha#new_game

Defined in:
lib/alpha/alpha.rb

#new_game(opponent_name) ⇒ Object

This method is called at the beginning of each game. A player may only be instantiated once and used to play many games. So new_game should reset any internal state acquired in previous games so that it is prepared for a new game.

The name of the opponent player is passed in. This allows for the possibility to learn opponent strategy and play the game differently based on the opponent.



28
29
30
# File 'lib/alpha/alpha.rb', line 28

def new_game(opponent_name)
  reset
end