Sha256: be6cf721f0da3d12be7e6971316275fcca3a87d0a3ab9763ec05f9a952562c4e
Contents?: true
Size: 732 Bytes
Versions: 1
Compression:
Stored size: 732 Bytes
Contents
module TTT class Board attr_accessor :squares def initialize(args = {}) @squares = args[:squares] end def change_square(display_value, new_value) square_to_change = retrieve_square(display_value) square_to_change.change_value(new_value) end def full? return squares.full? end def won? return squares.any_combination_won? end def display_values return squares.display_values end def available_choices return squares.available_choices end def number_of_rows_cols squares.number_of_rows_cols end private def retrieve_square(display_value) return squares.retrieve_square(display_value) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
games_bfox-0.4.0 | lib/games/tictactoe/board.rb |