public NatrisBoard() { widthInPixels = (Constants.gridWidth * Constants.blocksize) + 2 * Constants.innerBoardPadding + (Constants.gridWidth + 1) * Constants.blockPadding; heightInPixels = (Constants.gridHeight * Constants.blocksize) + 2 * Constants.innerBoardPadding + (Constants.gridHeight + 1) * Constants.blockPadding; CellMap = new int[Constants.gridWidth, Constants.gridHeight, 2]; blockBrush = new PrimitiveLine(Engine.graphicsDevice, Engine.spriteBatch, Color.White); ClearBoard(); currentPiece = GetNewRandomPiece(); nextPiece = GetNewRandomPiece(); nextPiece.setPreview(true); }
public void QueueNextPiece() { currentPiece = nextPiece; currentPiece.setPreview(false); nextPiece = GetNewRandomPiece(); nextPiece.setPreview(true); }