User talk:Huangxifa
From SwarmWiki
I'm using Swarm2.1.1 in Windows2000,programme with java. I have two questions:
- Globals.env.uniformIntRand.getIntegerWithMin$withMax(min,max)
If we use this method to get an integer within min and max,though we cann't predict which value we will get,but it showed that every time you run the application include,it will return the same values.So it is not random,yes?
- In the "jheatbugs2.1" example,if I want to destroy a Agent(i.e bug) from the heatbuglist,I detect one place to see if it has a bug in it using
"if((world.getObjectAtX$Y(doorX,doorY))!=null)" ,if true,then I do two things: "heatbugList.remove(world.getObjectAtX$Y(doorX,doorY));" and "world.putObject$atX$Y (null, doorX, doorY);".
But I find myself wrong,and I don't know why. could you tell me? thanks.
(I'm a Chinese student not very good at English.Please don't mind.)
- You should subscribe to the Swarm: Mailing lists and ask your questions there . --Alex 08:11 8 Apr 2004 (EDT)
![[Main Page]](/stylesheets/images/wiki.png)