public void keyPressed(KeyEvent e) {
		
		int dr=0;
		
		if (e.getKeyCode() == KeyEvent.VK_P) {
			if (pause)
				pause = false;
			else
				pause = true;
		}
		
		/**
		if (e.getKeyCode() == KeyEvent.VK_M) {
			if (music)
				music = false;
			else
				music = true;
		}
		*/
		
		if (!pause) {
			if (e.getKeyCode() == KeyEvent.VK_LEFT) {
				dr = -1;
			}
			else if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
				dr = 1;
			}
			else if (e.getKeyCode() == KeyEvent.VK_DOWN) {
				
				if (!pause)
					rush = true;
			}
			else if (e.getKeyCode() == KeyEvent.VK_SPACE) {
				game.rotatePiece();
			}
			
			if (dr != 0) {
				game.movePiece(dr);
			}
		}
		
		repaintScreen();
	}