Class: TicTacToe
- Inherits:
-
Object
- Object
- TicTacToe
- Defined in:
- lib/tic_tac_toe.rb,
lib/tic_tac_toe/tui.rb,
lib/tic_tac_toe/board.rb,
lib/tic_tac_toe/rules.rb,
lib/tic_tac_toe/cursor.rb,
lib/tic_tac_toe/player.rb,
lib/tic_tac_toe/tui/board.rb,
lib/tic_tac_toe/tui/setup.rb,
lib/tic_tac_toe/tui/cursor.rb,
lib/tic_tac_toe/tui/status.rb
Defined Under Namespace
Classes: Board, Cursor, Player, PlayerList, Rules, TUI
Instance Method Summary collapse
-
#initialize(size: 3, number_of_players: 2, goal: 3) ⇒ TicTacToe
constructor
A new instance of TicTacToe.
- #start ⇒ Object
Constructor Details
#initialize(size: 3, number_of_players: 2, goal: 3) ⇒ TicTacToe
Returns a new instance of TicTacToe.
8 9 10 11 12 13 |
# File 'lib/tic_tac_toe.rb', line 8 def initialize(size: 3, number_of_players: 2, goal: 3) @board = TicTacToe::Board.new(size) @players = TicTacToe::PlayerList.new(number_of_players) @cursor = TicTacToe::Cursor.new(@board) @rules = TicTacToe::Rules.new(goal) end |