コード例 #1
0
 void OnGameBettingRoundStarted_Console(object sender, RoundEventArgs e)
 {
     if (InvokeRequired)
     {
         // We're not in the UI thread, so we need to call BeginInvoke
         BeginInvoke(new EventHandler<RoundEventArgs>(OnGameBettingRoundStarted_Console), new[] { sender, e });
         return;
     }
     var table = m_Game.Table;
     WriteLine("==> Beginning of " + RoundNameFromId(e.Round));
     var boardCards = table.Cards.Where(c => c != null && c.Id != GameCard.NoCard.Id).ToArray();
     if (boardCards.Any())
         WriteLine("==> Current board cards: " + string.Join(" ", boardCards.Select(c => c.ToString())));
 }
コード例 #2
0
        void OnGameBettingRoundStarted(object sender, RoundEventArgs e)
        {
            if (InvokeRequired)
            {
                // We're not in the UI thread, so we need to call BeginInvoke
                BeginInvoke(new EventHandler<RoundEventArgs>(OnGameBettingRoundStarted), new[] { sender, e });
                return;
            }
            SuspendLayout();
            var table = m_Game.Table;
            foreach (var p in table.Players)
                m_Huds[p.NoSeat].Alive = true;

            var i = 0;
            for (; i < table.Cards.Length; ++i)
                m_Board[i].Card = table.Cards[i];
            for (; i < 5; ++i)
                m_Board[i].Card = GameCard.NoCard;
            ResumeLayout();
        }