Class: TicTacToe::Board::Row
- Inherits:
-
Object
- Object
- TicTacToe::Board::Row
- Includes:
- SquaresContainer
- Defined in:
- lib/game_tictactoe_alu4078/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.
16 17 18 19 |
# File 'lib/game_tictactoe_alu4078/tictactoe.rb', line 16 def initialize( squares, names ) @squares = squares @names = names end |
Instance Method Details
#to_board_name(index) ⇒ Object
23 24 25 |
# File 'lib/game_tictactoe_alu4078/tictactoe.rb', line 23 def to_board_name( index ) Board.index_to_name(@names[index]) end |