This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
HELP!
By USER67, with 5 replies.
Last reply by USER67, over 12 years ago:
Thanks a bunch!
question..
By ader108, with 3 replies.
Last reply by Gevater_Tod4711, over 12 years ago:
no static is not unchageable. thats final.
Greenfoot friends!
By jabirfatah91, with no replies.
How are you all? Any new news?
Hey
By BradH, with 9 replies.
Last reply by Spilli, over 12 years ago:
Ok ;)
Snake Movement
By ThanosDoulgeris, with 1 reply.
Replied to by Gevater_Tod4711, over 12 years ago:
There are many Snake projects on this page and also some of them are with-source. It would be the easyest way if your could just look at this scenarios and see how they've done this.
A simple question! Please answer.
By myheartwillgoon, with 1 reply.
Replied to by Gevater_Tod4711, over 12 years ago:
Set speed doesn't set the speed of only one class but of whole Greenfoot. so if you say Greenfoot.setSpeed(35); and then Greenfoot.setSpeed(15); Greenfoot will only use the second of this values. Also in the botom right of greenfoot there is a scrollbar to set Greenfoots speed.
problems to write the right code for a scenario
By Insomnia, with 4 replies.
Last reply by Insomnia, over 12 years ago:
Do you want to write the code for me? :D I am not able to do this :(
What do we mean by regular array?
By hkrhässleholm, with 9 replies.
Last reply by hkrhässleholm, over 12 years ago:
Thanks, i think i got My expected answer
The nullPointerException error...
By Stormtrooper299, with 10 replies.
Last reply by davmac, over 12 years ago:
<Code Omitted>
But does that still have the same problem?
Yes, because if Enemies.main is null the call to Enemies.main.getWorld() causes a NullPointerException. However, you can simply change the order: <Code Omitted> In this version, due to "lazy evaluation", if Enemies.main is null then Enemies.main.getWorld() will not be evaluated.
Avoid start screen
By Malmotri, with 4 replies.
Last reply by Malmotri, over 12 years ago:
Some other thing is wrong wrong now. This shows up java.lang.ArrayIndexOutOfBoundsException: 3 at Snake.act(Snake.java:34) 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 uploaded this scenario so you you can see whats wrong. I would be very grateful. http://www.greenfoot.org/scenarios/6773 This is how i did it.
How can I create red brick square on greenfoot?
By Future, with 1 reply.
Replied to by danpost, over 12 years ago:
We could say that the code to get a square/rectangle is built into the GreenfootImage of the Actor. Each actor has an 'image' which IS a rectangular area. Within the bounds of this rectangle is where the image of the actor appears. You only need to create a GreenfootImage object of appropriate size and draw along each edge the image of the brick (just program it to draw one edge, then rotate the main image to continue drawing the brick image around all four edges).
help
By BradH, with 2 replies.
Last reply by BradH, over 12 years ago:
ahhh, thanks just a simple error.
cannot find symbol - method getColor()
By JES201027, with 4 replies.
Last reply by JES201027, over 12 years ago:
Never mind I got it, thanks though!
Make object1 push object 2 to a certain location and go back to its starting location
By Luffy, with 6 replies.
Last reply by Luffy, over 12 years ago:
Thanks
java alternative to string.copy?
By erdelf, with 10 replies.
Last reply by davmac, over 12 years ago:
Well apparently, the C++ copy method returns:
The effective length of the sequence of characters copied to s. This may either be equal to parameter n or to size()-pos, whichever is smaller (see description of parameter n).
which also makes me notice that the code I gave above doesn't account for when the specified substring would be longer than the string itself. But you can check that for yourself, adjust the second parameter of substr appropriately, and calculate the amount "copied" by subtracting the first parameter value from the second (or even just taking the length of the
914
915
916
917
918
919
920
X