示例#1
0
        public FrmWordsBingo(Game game)
        {
            this.alphabet    = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            this.currentGame = game;
            InitializeComponent();

            if (core == null)
            {
                pbCamera.BringToFront();
                pbCamera.Visible = true;
                core             = new NyARWordsBingoCore(label12, currentGame, pbCamImage);
                CheckForIllegalCrossThreadCalls = false;
            }
        }
示例#2
0
        public void BallTest1Letter()
        {
            Game       game = new Game();
            PictureBox pbx  = new PictureBox();
            Label      lbl  = new Label();

            game.SelectedObject = "bola";

            //Lista de objetos detectados
            ArrayList raffledLetters = new ArrayList();

            raffledLetters.Add(char.Parse("c"));
            raffledLetters.Add(char.Parse("p"));
            raffledLetters.Add(char.Parse("m"));
            raffledLetters.Add(char.Parse("a"));

            NyARWordsBingoCore core = new NyARWordsBingoCore(lbl, game, pbx);

            Assert.AreEqual((game.SelectedObject.Length - 3), core.checkTotalLetters(raffledLetters, game.SelectedObject));

            //Encerrando a captura e desalocando o objeto do jogo
            core.stopCapture();
            core = null;
        }