def move_origins(moves = nil)
      moves         ||= MOVES[move.piece.downcase]
      possibilities   = []
      file, rank      = destination_coords

      moves.each do |i, j|
        f = file + i
        r = rank + j

        if valid_square?(f, r) && self.board.at(f, r) == move.piece
          possibilities << [f, r]
        end
      end

      possibilities
    end
def move_origins(moves = nil)
      moves         ||= MOVES[move.piece.downcase]
      possibilities   = []
      file, rank      = destination_coords

      moves.each do |i, j|
        f = file + i
        r = rank + j

        if valid_square?(f, r) && self.board.at(f, r) == move.piece
          possibilities << [f, r]
        end
      end

      possibilities
    end
From the destination square, make each move. If it is a valid
 square and matches the moving piece, add it to the list of origin
 possibilities.