Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     PurchasePacks();
     foreach (BingoGame game in session.GameList)
     {
         BingoGameState state = session_event.StepTo(session.GameList.IndexOf(game));
         session_event.PlayGame(state);
     }
 }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            // play cards vs db...

            BingoSession session = new BingoSession();
            Pattern      p       = new Pattern();

            p.algorithm     = OpenSkieScheduler3.PatternDescriptionTable.match_types.CrazyMark;
            p.repeat_count  = 24;
            p.crazy_hardway = true;

            BingoGame game;

            session.GameList.Add(game = new BingoGame(new BingoGameCore4.Pattern[] { p }));

            BingoGameGroup game_group = new BingoGameGroup(Guid.Empty);

            game_group.Add(game);

            BingoPacks packs = new BingoPacks(session.GameList, schedule, null);


            BingoGameCore4.CardMaster.CardReader card_file
                = new BingoGameCore4.CardMaster.CardReader("c:\\ftn3000\\data\\cards\\Random 360k (50s300w)(81_Full).20110225.dat");

            BingoDealer dealer = BingoDealers.GetDealer(card_file, 1, 1);

            packs.CreatePack(dealer, "Test Pack");
            BingoPack pack = packs.MakePack("Test Pack", card_file.Length);

            BingoSessionEvent session_evnet = new BingoSessionEvent(session, true);
            BingoPlayer       player;

            player = new BingoPlayer();

            PlayerTransaction transaction;

            player.transactions.Add(transaction = new PlayerTransaction(player, 12345689));
            player.PlayPack(transaction, pack);

            session_evnet.PlayerList.Add(player);
            BallDataExternal bde = new BallDataExternal();

            session_evnet.ball_data = bde;

            BingoGameState game_state = session_evnet.StepTo(0);

            bde.Balls = calls[0];
            session_evnet.Play(game_state);
        }
Exemplo n.º 3
0
 void bingo_game_core_data_GameChanged(int game)
 {
     if (session != null)
     {
         if (game == _game)
         {
             return;
         }
         _game = game;
         if (game > 0)
         {
             BingoGameState game_state = session_event.StepTo(game - 1);
             //This begins a thread to do the playing and returns.
             session_event.BeginGame(game_state);
         }
         else
         {
         }
     }
 }