function clearDeck() {
		var onDeckCanvas = document.getElementsByClassName("tetron-next-piece")[0]
		var ctx = onDeckCanvas.getContext("2d");
		ctx.clearRect(0, 0, canvas.width, canvas.height);
	}
//Clearing the piece on deck before adding the next piece on deck
Clearing the piece on deck before adding the next piece on deck
Clearing the piece on deck before adding the next piece on deck
function clearDeck() {
		var onDeckCanvas = document.getElementsByClassName("tetron-next-piece")[0]
		var ctx = onDeckCanvas.getContext("2d");
		ctx.clearRect(0, 0, canvas.width, canvas.height);
	}
function clearDeck ( ) { var onDeckCanvas = document . getElementsByClassName ( "tetron-next-piece" ) [ 0 ] var ctx = onDeckCanvas . getContext ( "2d" ) ; ctx . clearRect ( 0 , 0 , canvas . width , canvas . height ) ; }
Clearing the piece on deck before adding the next piece on deck
Clearing the piece on deck before adding the next piece on deck