private void NewGame() { Rounds.Clear(); ResultText = string.Empty; //TODO: get rounds from the config GameService.NewGame(2, SelectedComputer); PerformMoveCommand.RaiseCanExecuteChanged(); }
public override void Cleanup() { base.Cleanup(); CurrentPlayer = null; EquipmentValueData.Clear(); Rounds.Clear(); DamageArmorData.Clear(); DamageHealthData.Clear(); MoneyEarnedData.Clear(); TotalDamageArmorData.Clear(); TotalDamageHealthData.Clear(); WeaponKillData.Clear(); }
public override void Cleanup() { base.Cleanup(); HasNotification = false; IsBusy = false; CurrentPlayer = null; EquipmentValueData.Clear(); Rounds.Clear(); DamageArmorData.Clear(); DamageHealthData.Clear(); MoneyEarnedData.Clear(); TotalDamageArmorData.Clear(); TotalDamageHealthData.Clear(); WeaponKillData.Clear(); NotificationMessage = string.Empty; }
private void LoadRounds() { Rounds.Clear(); Rounds.Add(1); int currentRound = 1; foreach (List <MatchupModel> matchups in Tournament.Rounds) { if (matchups.First().MatchupRound > currentRound) { currentRound = matchups.First().MatchupRound; Rounds.Add(currentRound); } } }
/// <summary> /// Sets up the default tournament parameters. Creates a first round and sets default judging criterais /// </summary> public void InitializeDefaults() { EnsureListsAreInitialized(); Rounds.Clear(); JudgingCriteria = DefaultDataFactory.GetJudgingCriteria(); foreach (var crit in JudgingCriteria) { crit.Tournament = this; } // Adds a single round called "Finale" var round = new Round(Resources.Text.Finals); round.Tournament = this; round.RoundNo = 1; Rounds.Add(round); }
public static void DestroyAllData() { Rounds.Clear(); QuizName = "Quiz du fun"; CurTopicName = ""; BackgroundName = "wallpaper1"; IntroMusicName = "intro"; OutroMusicName = "outro1"; QuestionMusicName = "question"; TopicMusicName = "topic"; RoundNumber = 1; IroundCur = 0; ItopicCur = 0; IquestionCur = 0; Rounds = new List <RoundData>(); }
private void LoadRounds() { var fileName = FileDialogService.FileNameFromOpenFileDialog(ProgramTexts.FileDialog_XmlFileFilter); if (fileName.IsNullOrEmpty()) { return; } try { using (var sr = new StreamReader(fileName)) { var deserializedRounds = (List <RoundSerializable>)_roundsSerializer.Deserialize(sr); Rounds.Clear(); deserializedRounds.ForEach(x => Rounds.Add(x.GetRound())); } } catch { MessageBox.Show(ProgramTexts.ErrorWhileSavingRoundsToFile); } }
public void ResetStats(bool resetTeams = true) { DispatcherHelper.CheckBeginInvokeOnUI(delegate { AverageHealthDamage = 0; AverageHltvRating = 0; AverageEseaRws = 0; AssistPerRound = 0; DeathPerRound = 0; KillPerRound = 0; DamageHealthCount = 0; DamageArmorCount = 0; MvpCount = 0; KillCount = 0; KnifeKillCount = 0; TeamKillCount = 0; HeadshotCount = 0; AssistCount = 0; DeathCount = 0; SmokeThrownCount = 0; FlashbangThrownCount = 0; HeadshotCount = 0; DecoyThrownCount = 0; MolotovThrownCount = 0; IncendiaryThrownCount = 0; HitCount = 0; WeaponFiredCount = 0; AssistPerRound = 0; DeathPerRound = 0; OneKillCount = 0; TwoKillCount = 0; ThreeKillCount = 0; FourKillCount = 0; FiveKillCount = 0; ScoreTeam1 = 0; ScoreTeam2 = 0; ScoreFirstHalfTeam1 = 0; ScoreFirstHalfTeam2 = 0; ScoreSecondHalfTeam1 = 0; ScoreSecondHalfTeam2 = 0; Rounds.Clear(); WeaponFired.Clear(); Kills.Clear(); Overtimes.Clear(); PositionPoints.Clear(); MolotovsFireStarted.Clear(); DecoyStarted.Clear(); BombPlanted.Clear(); BombDefused.Clear(); BombExploded.Clear(); BombPlanted.Clear(); BombDefused.Clear(); BombExploded.Clear(); ClutchCount = 0; ClutchLostCount = 0; ClutchWonCount = 0; EntryKillCount = 0; MostBombPlantedPlayer = null; MostEntryKillPlayer = null; MostHeadshotPlayer = null; MostKillingWeapon = null; HasCheater = false; PlayersHurted.Clear(); PlayerBlinded.Clear(); Winner = null; Surrender = null; if (resetTeams) { Players.Clear(); TeamCT.Clear(); TeamT.Clear(); } else { foreach (Player playerExtended in Players) { playerExtended.ResetStats(); } } }); }