lib/games/tictactoe/board.rb in games_bfox-0.3.0 vs lib/games/tictactoe/board.rb in games_bfox-0.4.0

- old
+ new

@@ -1,11 +1,10 @@ module TTT class Board - attr_accessor :rows_and_cols, :squares + attr_accessor :squares def initialize(args = {}) - @rows_and_cols = args[:rows_and_cols] @squares = args[:squares] end def change_square(display_value, new_value) square_to_change = retrieve_square(display_value) @@ -26,11 +25,11 @@ def available_choices return squares.available_choices end - def number_of_rows - rows_and_cols + def number_of_rows_cols + squares.number_of_rows_cols end private def retrieve_square(display_value) return squares.retrieve_square(display_value)