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

2011/6/28

Checking for values of things in range

1
2
3
4
Lildarkone Lildarkone

2011/6/30

#
put this instead of get(person.sex) and i think it will work if(person.sex == 0) { do this } if(person.sex == 1) { do this }
kiarocks kiarocks

2011/6/30

#
no, didnt work
danpost danpost

2011/6/30

#
kiarocks, instead of 'get(person.sex);' you should have 'person.getSex();'. Also, instead of 'List person = ...' , try 'List<Person>persons = ...' With '<Person>' in the expression, greenfoot will return the person, instead of just a reference to it. As a reference, you cannot get 'sex' or 'infectionStage' or any other information; but as a Person, you have access to all the information.
danpost danpost

2011/6/30

#
kiarocks -- are you there? Lildarkone -- please double check gravity, contortion, and zoom level. And give the (x, y) coordinates. Reply back.
kiarocks kiarocks

2011/6/30

#
im here now
danpost danpost

2011/6/30

#
Alright, let me know when you got it.
kiarocks kiarocks

2011/6/30

#
problem-they just randomly are disappearing. i did get it.
danpost danpost

2011/6/30

#
Yea, but not quite random; They are growing old and dying!
danpost danpost

2011/6/30

#
Like I said before, I do have a few things I wanted to work on. That was one of them -- what they do when the un-infected die.
kiarocks kiarocks

2011/6/30

#
the problem is there are no new ones to take their place. :(
danpost danpost

2011/6/30

#
That deals with adjusting the parameters for procreation and infection rate.
danpost danpost

2011/6/30

#
But, if you notice, there is a lag between the time a male and a female meet, and the time the birth occurs. I just need to fiddle with it a bit to get to a point where SOMETIMES they all die off AND SOMETIMES they over-populate the world. (Not as easy as it sounds; especially if were trying to keep what is happening to represent what happens in real life).
kiarocks kiarocks

2011/6/30

#
how about if they are pregnant, they are invincible to virus!!
danpost danpost

2011/6/30

#
Maybe (as long as they are not already infected). But if they already are, maybe there offspring should be also.
kiarocks kiarocks

2011/6/30

#
ok. i think this should be a joint project between you and me. what do you think?
There are more replies on the next page.
1
2
3
4