CardsAgainstIRC3.Game.States.VoteForCards.UserLeft C# (CSharp) Method

UserLeft() public method

public UserLeft ( GameUser user, bool voluntarily ) : bool
user GameUser
voluntarily bool
return bool
        public override bool UserLeft(GameUser user, bool voluntarily)
        {
            user.CanVote = user.CanChooseCards = false;

            if (!Votes.ContainsKey(user.Guid))
                return !CardsetOrder.Contains(user);

            if (Votes[user.Guid] == null)
                Votes.Remove(user.Guid);

            SelectWinner();

            return true;
        }