public void keyReleased(KeyEvent e, boolean type) {
		int key = e.getKeyCode();
		if (type) {
			if (key == KeyEvent.VK_A)
				dx = 0;
			if (key == KeyEvent.VK_D)
				dx = 0;
			if (key == KeyEvent.VK_W)
				dy = 0;
			if (key == KeyEvent.VK_S)
				dy = 0;
		} else {

			if (key == KeyEvent.VK_LEFT)
				dx = 0;
			if (key == KeyEvent.VK_RIGHT)
				dx = 0;
			if (key == KeyEvent.VK_UP)
				dy = 0;
			if (key == KeyEvent.VK_DOWN)
				dy = 0;
		}
	}