public void update() {
        UP = key[KeyEvent.VK_UP] || key[KeyEvent.VK_W];
        DOWN = key[KeyEvent.VK_DOWN] || key[KeyEvent.VK_S];
        LEFT = key[KeyEvent.VK_LEFT] || key[KeyEvent.VK_A];
        RIGHT = key[KeyEvent.VK_RIGHT] || key[KeyEvent.VK_D];
        
        if (UP != prevUP) {
            System.out.println("UP changed! UP: " + UP);
            prevUP = UP;
        }
        if (DOWN != prevDOWN) {
            System.out.println("DOWN changed! DOWN: " + DOWN);
            prevDOWN = DOWN;
        }
        if (LEFT != prevLEFT) {
            System.out.println("LEFT changed! LEFT: " + LEFT);
            prevLEFT = LEFT;
        }
        if (RIGHT != prevRIGHT) {
            System.out.println("RIGHT changed! RIGHT: " + RIGHT);
            prevRIGHT = RIGHT;
        }
    }