public bool IncreaseScore(int value) { if (CanChangeScore()) { Score += value; Match.Group.OnMatchScoreIncreased(Match); bool groupJustFinished = Match.Group.GetPlayState() == PlayStateEnum.Finished; if (groupJustFinished) { if (Match.Group.Round.GetPlayState() == PlayStateEnum.Finished) { AdvancingPlayerTransfer advancingPlayerTransfer = new AdvancingPlayerTransfer(); advancingPlayerTransfer.TransferToNextRound(Match.Group.Round); } } MarkAsModified(); return(true); } return(false); }
public bool SolveTieByChoosing(PlayerReference playerReference) { List <StandingsEntry <PlayerReference> > tyingPlayers = FindProblematiclyTyingPlayers(); bool hasTyingPlayers = tyingPlayers.Count > 0; if (hasTyingPlayers) { bool playerChosen = ChooseTyingPlayer(playerReference); bool tieSolved = HasSolvedTie(); if (playerChosen && tieSolved) { AdvancingPlayerTransfer advancingPlayerTransfer = new AdvancingPlayerTransfer(); advancingPlayerTransfer.TransferToNextRound(Round); return(true); } } return(false); }