@Override
    public void onUpdate(World apples) {
       nightTime = apples.map!=0;
       if (!apples.inBounds(X, Y)||apples.checkCollision(X, Y)||life--<0)
       {
           alive = false;
       }
       if (next++%3==1)
       {
            radius+=1;
       }
        if (next%8==0)
            {
                int Re = yes.getRed(), Bl = yes.getBlue(), Gr = yes.getGreen();
                Gr = (Gr+0xFF)/3;
                yes = new Color(Re,Gr,Bl);
            }
       if (next>36)
       {
           next = 0;
       }
       
    }