Class: TTT::BoardBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/games/tictactoe/board_builder.rb

Instance Method Summary collapse

Instance Method Details

#generate_empty_board(config) ⇒ Object



5
6
7
8
# File 'lib/games/tictactoe/board_builder.rb', line 5

def generate_empty_board(config)
  number_of_rows_cols = config.number_of_rows_cols
  Board.new(rows_and_cols: number_of_rows_cols, squares: SquaresFactory.build_empty_squares(number_of_rows_cols) )
end