Module: SquaresContainer
- Included in:
- TresRaya::Board, TresRaya::Board::Row
- Defined in:
- lib/tres_raya/squares_container.rb
Instance Method Summary collapse
Instance Method Details
#[](index) ⇒ Object
2 |
# File 'lib/tres_raya/squares_container.rb', line 2 def []( index ) @squares[index] end |
#blanks ⇒ Object
4 |
# File 'lib/tres_raya/squares_container.rb', line 4 def blanks() @squares.find_all { |s| s == " " }.size end |
#os ⇒ Object
5 |
# File 'lib/tres_raya/squares_container.rb', line 5 def os() @squares.find_all { |s| s == "O" }.size end |
#xs ⇒ Object
6 |
# File 'lib/tres_raya/squares_container.rb', line 6 def xs() @squares.find_all { |s| s == "X" }.size end |