lib/chess/pawn.rb
# Returns the possible_moves for a white pawn
Returns the possible_moves for a white pawn
Returns the possible_moves for a white pawn
def white_pawn_moves(row, column)
      moves = []
      moves << [row + 1, column]
      moves << [row + 2, column] unless @moved
      moves << [row + 1, column - 1]
      moves << [row + 1, column + 1]
      moves
    end
def white_pawn_moves ( row , column ) moves = [ ] moves << [ row + 1 , column ] moves << [ row + 2 , column ] unless @moved moves << [ row + 1 , column - 1 ] moves << [ row + 1 , column + 1 ] moves end
Returns the possible_moves for a white pawn
Returns the possible_moves for a white pawn
row
<not_specific>
column
<not_specific>