//initialize the board public Board() { CellMap = new int[gridWidth, gridHeight, 2]; //depth of 2: [,,0] refers to whether the object is there, [,,1] is the color ClearBoard(); currentPiece = GetNewRandomPiece(); nextPiece = GetNewRandomPiece(); Width = gridWidth * boxPixelSize + 2 * borderpadding + ((gridWidth + 1) * innerpadding); Height = gridHeight * boxPixelSize + 2 * borderpadding + ((gridHeight + 1) * innerpadding); }
public void QueueNextPiece() { currentPiece = nextPiece; nextPiece = GetNewRandomPiece(); }