Method: TTT::Game#initialize

Defined in:
lib/ttt/game.rb

#initialize(options) ⇒ Game

Returns a new instance of Game.



5
6
7
8
9
10
11
# File 'lib/ttt/game.rb', line 5

def initialize(options)
  self.board          = options[:board]
  self.player1        = options[:player1]
  self.player2        = options[:player2]
  self.current_player = self.player1
  self.history        = options.fetch(:history)
end