Class: Tictactoe::Board::Row
- Inherits:
-
Object
- Object
- Tictactoe::Board::Row
- Includes:
- SquaresContainer
- Defined in:
- lib/tictactoe/tictactoe.rb
Instance Method Summary collapse
-
#initialize(squares, names) ⇒ Row
constructor
A new instance of Row.
- #to_board_name(index) ⇒ Object
Methods included from SquaresContainer
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 |