static void DrawNextPiece() { byte posX = NEXT_POS_X + 1, posY = NEXT_POS_Y + 1; var nextTetrad = new Tetromino(nextPiece); for (byte x = 0; x < Tetromino.LENGTH; ++x) { for (byte y = 0; y < Tetromino.LENGTH; ++y) { Painting.brush = nextTetrad.Type[Tetromino.GetIndexByRotation(x, y, ref piece.rotation)]; Painting.DrawCell((short)(posX + x), (short)(posY + y), nextTetrad.Colour); } } }
static void DrawPiece(ref Tetromino piece) { for (byte x = 0; x < Tetromino.LENGTH; ++x) { for (byte y = 0; y < Tetromino.LENGTH; ++y) { var c = piece.Type[Tetromino.GetIndexByRotation(x, y, ref piece.rotation)]; if (c != ' ') { Painting.brush = c; Painting.DrawCell((short)(piece.x + x + 1), (short)(piece.y + y + 1), piece.Colour); } } } }