79173427

Date: 2024-11-09 18:25:23
Score: 1.5
Natty:
Report link

The problem is that when you copy the Player object, the Vector of Hero objects still points to the same heroes as the original Player. So when you add the copied heroes, they end up showing up twice.

To fix this, just create a new Vector for each player's heroes when you're copying, so that the new Player gets its own heroes.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Amar Sohail