if (contestant instanceof RobotPeer) {
robotSpec = ((RobotPeer) contestant).getRobotSpecification();
} else if (contestant instanceof TeamPeer) {
robotSpec = ((TeamPeer) contestant).getTeamLeader().getRobotSpecification();
}
results.set(rank, new RobotResults(robotSpec, battleResults));
}
return results.toArray(new BattleResults[results.size()]);
}