added logic to save attack/defend results