[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Swarm-Support] (no subject)
From: |
huangxifa |
Subject: |
[Swarm-Support] (no subject) |
Date: |
Tue, 13 Apr 2004 08:56:07 +0800 (CST) |
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.
- [Swarm-Support] (no subject),
huangxifa <=