コード例 #1
0
ファイル: Form1.cs プロジェクト: zhaojinweipay/TexasHoldem
        private void button22_Click(object sender, EventArgs e)
        {
            Hand handhighlights = new Hand();

            handhighlights = HandCombination.getHighCard(new Hand(myHand1));
            for (int i = 0; i < myHand1.Count(); i++)
            {
                for (int j = 0; j < handhighlights.Count(); j++)
                {
                    if (handhighlights.getCard(j) == myHand1.getCard(i) && handhighlights.getCard(j).getSuit() == myHand1.getCard(i).getSuit())
                    {
                        myHand1.getCard(i).Highlight();
                    }
                }
            }
            int x = 0;

            for (int i = 0; i < myHand1.Count(); i++)
            {
                Bitmap   bitmap = new Bitmap(myHand1.getCard(i).getImage());
                Graphics g      = Graphics.FromImage(b2);
                g.DrawImage(bitmap, 5 + x * 75, 5, 71, 96);
                x++;
            }
            pictureBox1.Image = b2;
        }