This site requires JavaScript, please enable it in your browser!
Greenfoot back
elizabethlc
elizabethlc wrote ...

2019/6/1

Could you help me I get error in this part          (200,roca.class);

elizabethlc elizabethlc

2019/6/1

#
List<Object> rocas=getObjectsInRange(200,roca.class);
        
        Iterator it=rocas.iterator();
        if(it.hasNext())
        {
            roca r=(roca)it.next();
            if(r!=null)
            {
                turnTowards(r.getX(),r.getY());
            }
        }
Wasupmacuz Wasupmacuz

2019/6/2

#
Can't believe nobody has replied yet. Edit: looks like you got it answered in another thread. Change
List<Object>
to
List<roca>
Good luck!
You need to login to post a reply.