lib/game_boards/board_utils/square_board_utils.rb
# I'm expecting game boards to be relatively small, with relatively few pieces.
I'm expecting game boards to be relatively small, with relatively few pieces.
I ' m expecting game boards to be relatively small with relatively few pieces .
def location_of_piece(game_piece)
      @game_board.each_with_index do |row,i|
        row.each_with_index do |piece,j|
          return [i,j] if piece == game_piece
        end
      end
      return nil
    end
def location_of_piece ( game_piece ) @game_board . each_with_index do | row , i | row . each_with_index do | piece , j | return [ i , j ] if piece == game_piece end end return nil end
I'm expecting game boards to be relatively small, with relatively few pieces.
I ' m expecting game boards to be relatively small with relatively few pieces .
game_piece
<not_specific>