lib/chess/rook.rb
# Returns an array of all up movements the rook can make
Returns an array of all up movements the rook can make
Returns an array of all up movements the rook can make
def up_moves(row, column)
      moves = []
      row += 1
      until row > 7
        moves << [row, column]
        row += 1
      end
      moves
    end
def up_moves ( row , column ) moves = [ ] row += 1 until row > 7 moves << [ row , column ] row += 1 end moves end
Returns an array of all up movements the rook can make
Returns an array of all up movements the rook can make
row
<not_specific>
column
<not_specific>