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

Comments for UserInfo Greeps

Return to UserInfo Greeps

I think this should be locked, it looks to be pretty easy to cheat when unlocked :P However, this concept is awesome!
bournebourne

2013/5/9

Do you mean by speeding it up? I think the time is determined by act cycles. So it's not like the greeps get to gather more when at a higher speed. Unless I'm overlooking something. And thanks! =)
When scenarios are unlocked, you can drag the actors around :]
UpupzealotUpupzealot

2013/5/9

So it's an Greenfoot mini in Greenfoot?
bournebourne

2013/5/9

Wow. Ha thanks! Totally forgot that was allowed when on site. Let me fix that..
A new version of this scenario was uploaded on Thu May 09 07:25:48 UTC 2013 Locked! so you can't drag em around. Will add like a scroller to adjust execution speed maybe tomorrow.
bournebourne

2013/5/9

@Upupzealot What do you mean by Greenfoot mini? It's programmed to recognize code (a relatively simple/limited set of production rules). That get structured as Objects that get called, mimicking normal execution.
There seems to be something involving memory that is causing an error when a number is going out of bounds 0-255. I don't believe my memory value is going out of this range, but I am unsure. Either way, if that is not a bug, it seems to be quite annoying since you lose your code every time it crashes.
UpupzealotUpupzealot

2013/5/9

@bourne Yes, I think it's awesome! I'm interested in how you did syntax check, could you tell me they are in witch class? There are too many of them
bournebourne

2013/5/9

What number goes out of bounds? (from your code - an input value)? Do you have a stack trace?
bournebourne

2013/5/9

@Upupzealot WriteTriggerUtil.class
java.lang.IllegalArgumentException: memory value must be in range [0..255] at Creature.setMemory(Creature.java:282) at SetMemoryEffect.execute(SetMemoryEffect.java:27) at Trigger.execute(Trigger.java:44) at Trigger.execute(Trigger.java:47) at Trigger.execute(Trigger.java:44) at Trigger.execute(Trigger.java:47) at Trigger.execute(Trigger.java:44) at GreepController.act(GreepController.java:24) at Greep.act(Greep.java:37) at greenfoot.core.Simulation.actActor(Simulation.java:565) at greenfoot.core.Simulation.runOneLoop(Simulation.java:523) at greenfoot.core.Simulation.runContent(Simulation.java:213) at greenfoot.core.Simulation.run(Simulation.java:203) I was not setting a value specifically, my code looked like so: if(checkMemory(=, 10)){ setMemory(0) }else{ setMemory(+, 1) }
UpupzealotUpupzealot

2013/5/9

@bourne, found that, I'm learning your code now :D
bournebourne

2013/5/9

@Builderboy Found and fixed your error. (Didn't have any check for you incrementing memory variable - didn't realize the Creature class throws that Exception for that method, thought it handled it silently) But found something else causing a NullPointerException that I'm looking into.
A new version of this scenario was uploaded on Thu May 09 08:36:40 UTC 2013 Fixed the 2 known bugs. Added way to print your code to terminal by pressing F7 (Textboxes can't have focus when done). Time for sleep and last final exam in 6 hours XD
danpostdanpost

2013/5/9

There seems to be a problem with saving the code and scores. It appears to be getting user info ok, thought.
danpostdanpost

2013/5/9

Would be nice to be able to use the 'return' statement.