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

#blanksObject



4
# File 'lib/tres_raya/squares_container.rb', line 4

def blanks()  @squares.find_all { |s| s == " " }.size end

#osObject



5
# File 'lib/tres_raya/squares_container.rb', line 5

def os()      @squares.find_all { |s| s == "O" }.size end

#xsObject



6
# File 'lib/tres_raya/squares_container.rb', line 6

def xs()      @squares.find_all { |s| s == "X" }.size end