Exemplo n.º 1
0
        public ZZZTOJ()
        {
            Game = new Jura_Knife_Tetris.game();

            Game.init();
            //newGame();
        }
Exemplo n.º 2
0
        public async void newGame()
        {
            await Task.Run(() =>
            {
                piececnt  = 0;
                end       = false;
                calumove  = false;
                reset     = false;
                starttime = -1;

                Game = new Jura_Knife_Tetris.game();
                idx1 = 0;
                Game.init();
            });
        }
Exemplo n.º 3
0
 public void run()
 {
     a = new game();
     //a.init();
     a.bot_init();
     for (int i = 0; i < 100; ++i)
     {
         a.bot_run();
         if (i % 10 == 0)
         {
             a.garbage_queue.Push(1);
         }
         a.deal_garbage();
         a.Board.console_print(false);
         //a.bot.boardtree.Board.console_print(false);
         char a1 = Console.ReadKey().KeyChar;
     }
 }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            game defaultgame = new game();

            defaultgame.Gamestart();

            //test t = new test();
            //t.run();

            //ljhcs a = new ljhcs();
            //a.run();


            //Random rand = new Random();
            ////Console.WriteLine("Hello World!");
            //board F = new board(new mino_gene(), new TopGarbage(), 5);
            //for (int i = 0; i < 100; ++i)
            //{
            //    //mino_gene minorule = new mino_gene();
            //    //mino b = minorule.getmino(rand.Next() % 7);
            //    //mino[] bt = minorule.bag7mino();
            //    //mino[] bt = { minorule.get_mino_wu(), minorule.get_mino_han()};
            //    //foreach (mino b in bt)
            //    //{

            //    //mino b = minorule.get_mino_wu();

            //    F.Spawn_piece();
            //    //b.setpos(18, 3);
            //    F.console_print(true, F.piece);
            //    //F.piece = b;

            //    while (!F.piece.locked)
            //    {
            //        char a = Console.ReadKey().KeyChar;

            //        switch (a)
            //        {
            //            case 'a':
            //                F.piece.left_move(ref F);
            //                break;
            //            case 'd':
            //                F.piece.right_move(ref F);
            //                break;
            //            case 's':
            //                F.piece.soft_drop(ref F);
            //                break;
            //            case 'w':
            //                F.piece.mino_lock(ref F);
            //                F.add_garbage(1);
            //                break;
            //            case 'l':
            //                F.piece.right_rotation(ref F);

            //                break;
            //            case 'k':
            //                F.piece.left_rotation(ref F);
            //                break;
            //            default:
            //                break;
            //        }
            //        Console.Clear();
            //        F.console_print(true, F.piece);
            //        int row = F.clear_full();
            //        if (F.piece.Tspin)
            //        {
            //            Console.WriteLine("tspin");
            //            if (F.piece.mini && row == 1)
            //                Console.WriteLine("mini");
            //        }

            //    }

            //}
        }