Module: TicTacToe::SquaresContainer

Included in:
Board, Board::Row
Defined in:
lib/game_tictactoe_alu4078/tictactoe.rb

Instance Method Summary collapse

Instance Method Details

#[](index) ⇒ Object



7
# File 'lib/game_tictactoe_alu4078/tictactoe.rb', line 7

def []( index ) @squares[index] end

#blanksObject



9
# File 'lib/game_tictactoe_alu4078/tictactoe.rb', line 9

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

#osObject



10
# File 'lib/game_tictactoe_alu4078/tictactoe.rb', line 10

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

#xsObject



11
# File 'lib/game_tictactoe_alu4078/tictactoe.rb', line 11

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