public FightRestrictions(FightTeam team) { this.SecuredTeam = team; }
public int RandomAvailableTeamPlaces(FightTeam team) { int randomCell = team.PlacementsPlaces[Utilities.Basic.Rand(0, team.PlacementsPlaces.Count - 1)]; int timeout = 0; while (team.HaveFightersOnThisPlace(randomCell)) { randomCell = team.PlacementsPlaces[Utilities.Basic.Rand(0, team.PlacementsPlaces.Count - 1)]; timeout++; if (timeout > 100) break; } return randomCell; }