public void tick() {
        if (isHit) {
            return;
        }

        if (tickCount == 0) {
            switch(dir) {
                case LEFT:
                    dx += -speed;
                    break;
                case RIGHT:
                    dx += speed;
                    break;
                case UP:
                    dy -= speed;
                    break;
                case DOWN:
                    dy += speed;
                    break;
            }

            setX(getX() + dx);
            setY(getY() + dy);

            tickCount = ticks;
        } else {
            tickCount--;
        }
    }