@Override
    public void move(int direction) {
        super.move(direction);

        rest++;
        if (rest > 20) {
            rest = 0;
            if (getHealth() < getMaxHealth()) {
                setHealth(getHealth() + 1);
            }
        }
        if (!isRunning() || rest % 3 == 0) {
            GamePanel.get().getCurrentDungeon().getCurrentMap().tick();
        }
        if (getEnergy() <= 0) {
            setRunning(false);
        }
        if (isRunning()) {
            setEnergy(getEnergy() - 1);
        } else if (rest % 3 == 0 && getEnergy() < maxEnergy) {
            setEnergy(getEnergy() + 1);
        }

        GamePanel.get().repaint();
    }