コード例 #1
0
ファイル: Game.cs プロジェクト: KunyiLiu/Mafia_on_Teams
        private void VoteOutPlayer()
        {
            // All players have the same vote
            string playerVote = ActivePlayers.FirstOrDefault()?.Vote;

            if (string.IsNullOrEmpty(playerVote))
            {
                return;
            }

            Player playerToEliminate = PlayerMapping[playerVote];

            EliminatePlayer(playerToEliminate);
        }
コード例 #2
0
 public bool IsActivePlayer(PlayerMobile pm, out PokerPlayer player)
 {
     player = ActivePlayers.FirstOrDefault(x => x.Owner == pm);
     return(player != null);
 }