Class: Tictactoe::Board::Row

Inherits:
Object
  • Object
show all
Includes:
SquaresContainer
Defined in:
lib/tictactoe/tictactoe.rb

Instance Method Summary collapse

Methods included from SquaresContainer

#[], #blanks, #os, #xs

Constructor Details

#initialize(squares, names) ⇒ Row

Returns a new instance of Row.



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

def initialize( squares, names )
  @squares  = squares
  @names    = names
end

Instance Method Details

#to_board_name(index) ⇒ Object



26
27
28
# File 'lib/tictactoe/tictactoe.rb', line 26

def to_board_name( index ) 
  Board.index_to_name(@names[index]) 
end