lib/chess/bishop.rb
# Returns an array of northwest diagonal moves the bishop can make
Returns an array of northwest diagonal moves the bishop can make
Returns an array of northwest diagonal moves the bishop can make
def northwest_moves(row, column)
      moves = []
      row += 1
      column -= 1
      until row > 7 || column < 0
        moves << [row, column]
        row += 1
        column -= 1
      end
      moves
    end
def northwest_moves ( row , column ) moves = [ ] row += 1 column -= 1 until row > 7 || column < 0 moves << [ row , column ] row += 1 column -= 1 end moves end
Returns an array of northwest diagonal moves the bishop can make
Returns an array of northwest diagonal moves the bishop can make
row
<not_specific>
column
<not_specific>