Class: ConsoleGame

Inherits:
Game
  • Object
show all
Defined in:
lib/console_game.rb

Instance Attribute Summary

Attributes inherited from Game

#game_state, #players

Instance Method Summary collapse

Methods inherited from Game

#active_player_class, #check_win, #initialize, #switch_active_player

Constructor Details

This class inherits a constructor from Game

Instance Method Details

#startObject



2
3
4
5
6
7
8
9
# File 'lib/console_game.rb', line 2

def start
  @players[:one] = choose_player('x')
  @players[:two] = choose_player('o')
  
  @game_state = GameState.new(@players[:one])
  
  game_loop
end