public FightTeam(sbyte id, List<short> placementcells, TeamColorEnum teamcolor, TeamTypeEnum teamtype) { this.PlacementCells = placementcells; this.TeamColor = teamcolor; this.TeamType = teamtype; this.Id = id; }
public FightTeam GetTeam(TeamTypeEnum teamType) { if (BlueTeam.Type == teamType) { return(BlueTeam); } if (RedTeam.Type == teamType) { return(RedTeam); } throw new Exception("Unable to find team (" + teamType + ")"); }
public void Update(FightTeamInformations team) { if (team == null) { throw new ArgumentNullException("team"); } if (team.teamId != (int)Id) { logger.Error("Try to update team {0} but the given object is for team {1}", Id, (FightTeamColor)team.teamId); } Leader = GetFighter(team.leaderId); if (Leader == null) { logger.Error("Cannot set the leader because fighter {0} is not in team", team.leaderId); } AlignmentSide = (AlignmentSideEnum)team.teamSide; TeamType = (TeamTypeEnum)team.teamTypeId; // don't care about the figthers infos }
public FightTeam(sbyte id, List <short> placementCells, AlignmentSideEnum side, TeamTypeEnum teamtype) { this.PlacementCells = placementCells; this.Side = side; this.Type = teamtype; this.Id = id; this.Options = new FightTeamOptions(this); }
public FightTeam(sbyte id, List <short> placementcells, TeamColorEnum teamcolor, TeamTypeEnum teamtype) { this.PlacementCells = placementcells; this.TeamColor = teamcolor; this.TeamType = teamtype; this.Id = id; }