示例#1
0
        static void Main(string[] args)
        {
            var man = new CardRecognizer();

            var image = Bitmap.FromFile("./1.bmp") as Bitmap;
            var txt = man.RecognizeText(image);
            //man.RecognizePlayer(image, "", 0);
            Console.ReadLine();
        }
示例#2
0
        public Table(int playerCount, AppSettings settings)
        {
            TotalRounds = 0;

            ButtonPlayerPrev = -999;
            _random = new Random();
            ShortButton1 = settings.ShortButtonRect1;
            ShortButton2 = settings.ShortButtonRect2;
            ShortButton3 = settings.ShortButtonRect3;
            ShortButton4 = settings.ShortButtonRect4;

            CardSuitRect = settings.CardSuitRect;
            CardRankRect = settings.CardRankRect;
            CardMinSize = (int)settings.MinCardSize;

            BetCounterPreFlop = 1;
            BetCounterFlop = 1;
            BetCounterTurn = 1;
            BetCounterRiver = 1;
            RaiseCounter = 0;

            PlayerActionCounter = 0;

            PlayerRects = new List<Rectangle>();
            PlayerFolds = new List<Rectangle>();
            ButtonRects = new List<Rectangle>();
            BetRects = new List<Rectangle>();

            Players = new PlayerCollection();
            DealerButtons = new List<bool>();
            PlayerBets = new List<PlayerBet>();

            MyBalance = new Player();
            Bank = new Bank();

            for (int i = 0; i < playerCount; i++)
            {
                Players.Add(new Player {Action = PlayerAction.Init});
            }

            for (int i = 0; i < playerCount; i++)
            {
                DealerButtons.Add(false);
            }

            for (int i = 0; i < playerCount; i++)
            {
                PlayerBets.Add(new PlayerBet());
            }

            _cardRecognizer = new CardRecognizer();
        }