Module: Tictactoe::SquaresContainer
- Included in:
- Board, Board::Row
- Defined in:
- lib/tictactoe/tictactoe.rb
Instance Method Summary collapse
Instance Method Details
#[](index) ⇒ Object
10 |
# File 'lib/tictactoe/tictactoe.rb', line 10 def []( index ) @squares[index] end |
#blanks ⇒ Object
12 |
# File 'lib/tictactoe/tictactoe.rb', line 12 def blanks() @squares.find_all { |s| s == " " }.size end |
#os ⇒ Object
13 |
# File 'lib/tictactoe/tictactoe.rb', line 13 def os() @squares.find_all { |s| s == "O" }.size end |
#xs ⇒ Object
14 |
# File 'lib/tictactoe/tictactoe.rb', line 14 def xs() @squares.find_all { |s| s == "X" }.size end |