I recently discovered someone managed to get an Alakazam and a Gengar on the Virtual Game Boy on the computer, which is normally only possible through trading.

How is this possible? Is there a way to trade on an emulator or trick the game into evolving Kadabra or Haunter without actually trading them?