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
Decimal.Format
By dbutts1@stumail.com, with 2 replies.
Last reply by dbutts1@stumail.com, almost 8 years ago:
Thank you. I've been looking at this so long I see that my main issue was I never put in import java.text.DecimalFormat;
Button not working :(
By PeloviaOliver, with 4 replies.
Last reply by danpost, almost 8 years ago:
Maybe you did not understand what I was trying to say above. You need to change the offsets at which you check on the color. If you really want to check that it moves at all, change 'canMove()' to 'true' on line 11.
I dont know what to do
By Bandito, with 14 replies.
Last reply by Bandito, almost 8 years ago:
alright sorry, that I answered it so late but my comment was reported for being potential spam, i figured everything out thanks though
Why does this not work?
By Simon1122111, with 16 replies.
Last reply by Simon1122111, almost 8 years ago:
ok thank you very much!
Problem with showing the images
By qazxsw21, with 8 replies.
Last reply by danpost, almost 8 years ago:
Change line 51 in the Enemy class to 'else if ...'.
Changing characters in a string to all caps
By WardedBowl403, with 2 replies.
Last reply by WardedBowl403, almost 8 years ago:
Oh wow. I did not know that existed. Thanks!
How to remove text?
By WardedBowl403, with 1 reply.
Replied to by danpost, almost 8 years ago:
What text are you trying to remove? are you trying to replace that text? do you not have a Message class? Need more information and code?
Runtime Error Window
By suzbo, with 2 replies.
Last reply by Super_Hippo, almost 8 years ago:
See this discussion:
https://www.greenfoot.org/topics/58676/0#post_115370
ERROR: Class java.awt.Rectangle was not found
By Busch2207, with 6 replies.
Last reply by Yehuda, almost 8 years ago:
The same way it used to only work on certain browsers and only if you allow it (in java control panel).
Animated Gif
By suzbo, with 5 replies.
Last reply by danpost, almost 8 years ago:
Along with your fields declared on lines 12 and 13, add a GifImage reference field and assign a GifImage object given your gif file: <Code Omitted>The gif file should be in the 'images' folder of the project folder. Line 25 should be: <Code Omitted>This line initializes your world background image. The same line of code should also be in the 'act' method of the class to run the animation when the scenario is running.
How do I make my own MyWorld constructor
By jkfrmsttfrm, with 1 reply.
Replied to by danpost, almost 8 years ago:
Move the code in your current constructor into your new constructor and replace your old no-parameter constructor with the following: <Code Omitted>You can then work with the parameter value within the new constructor.
How to get method from another world
By Arifwc, with 1 reply.
Replied to by danpost, almost 8 years ago:
I guess one way is to go through a Menu world to start a new TetrisWorld world by utilizing a second Menu world constructor. Something like this: <Code Omitted>Then, instead of going directly to a new TetrisWorld at restart, go to a Menu world with this: <Code Omitted>
how to make random choice, but cannot choose same number
By rey24, with 1 reply.
Replied to by danpost, almost 8 years ago:
What is line 13 supposed to be doing (what are you intending it to do)? The array is to contain elements of type 'int'. This is a primitive type which cannot be 'null' as all primitive types have default values ('false' for boolean and '0' for all others). So, if line 13 is trying to do what it looks like, then maybe you should check for a meaningless value, like '-1' and set it to that value at lines 18. Lines 18 and 19 seems to deal with a possible different element of the array (using index value from 'x' instead of 'ke'). In fact, it appears that if you use 'x', the index could en
||ERROR|| Class, interface, or enum expected ||ERROR||
By Max64751, with 2 replies.
Last reply by danpost, almost 8 years ago:
Line 2 should start 'public
class
'.
Making extra walls, that an actor cannot pass through
By XD-69, with 1 reply.
Replied to by Super_Hippo, almost 8 years ago:
In
my Pac-Man game
, I saved the map as an array in the world, so Pac-Man can check if there is a "wall" on the side. You can download the game and check the code. The alternative is to have walls as actors in the world. Then Pac-Man can move, and if it hits a wall, you place it back to where it came from.
303
304
305
306
307
308
309
X