private TetrisState NewTetrisState(Tetris tetris) { UpdateQueue(tetris); CustomTetrisRNG rng = new CustomTetrisRNG(this); return(new TetrisState(new Tetris(tetris, rng), rng)); }
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 }); }
public CustomTetrisRNG(CustomTetrisRNG from) { bot = from.bot; index = from.index; }
public TetrisState(Tetris tetris, CustomTetrisRNG tetRng) { this.tetris = tetris; this.tetRng = tetRng; tetrimino = tetris.current; }