Ejemplo n.º 1
0
        private TetrisState NewTetrisState(Tetris tetris)
        {
            UpdateQueue(tetris);
            CustomTetrisRNG rng = new CustomTetrisRNG(this);

            return(new TetrisState(new Tetris(tetris, rng), rng));
        }
Ejemplo n.º 2
0
        public TetrisState DoMove(TetriminoState move, Pathfinder.MoveNode moveNode, bool hold)
        {
            CustomTetrisRNG childRng = new CustomTetrisRNG(tetRng);
            Tetris          child    = new Tetris(tetris, childRng);

            if (hold)
            {
                child.Hold();
            }
            Tetrimino tetrimino = child.current;

            child.pieceX        = move.x;
            child.pieceY        = move.y;
            child.pieceRotation = move.rot;
            child.HardDrop();
            child.tspin = moveNode.tspin;
            return(new TetrisState(child, childRng)
            {
                usesHeld = hold,
                tetrimino = tetrimino
            });
        }
Ejemplo n.º 3
0
 public CustomTetrisRNG(CustomTetrisRNG from)
 {
     bot   = from.bot;
     index = from.index;
 }
Ejemplo n.º 4
0
 public TetrisState(Tetris tetris, CustomTetrisRNG tetRng)
 {
     this.tetris = tetris;
     this.tetRng = tetRng;
     tetrimino   = tetris.current;
 }