Greenfoot
Greenfoot is a Java based Integrated Development Environment (IDE) for developing two-dimensional animation and games while learning the Java language. Many programs we can create in Scratch we can also create in Greenfoot. More information on Greenfoot can be found at: http://www.greenfoot.org
Basic Mover
Requirements:
1. Create a Greenfoot world
2. Create a Greenfoot Actor and place in the center of the world
3. Write a method that allows the user to use the arrow keys to move the Actor around the world.
Code Samples for Basic Mover
Target Game
Requirements:
1. Create a Greenfoot world with a 400x400 grid with size of 1 px.
2. Create subclass Actors from "Sprite":
- Shooter
- Ball
- Target
3. Ball must start at the shooter and move when "Space" key is pressed.
4. If Ball touches the Target - the Target must disappear.
5. When Ball reaches the edge of the Screen, the Ball must move back to the Shooter.
Pong
Requirements:
1. Create a Greenfoot world with a 500x400 grid with size of 1 px.
2. Create subclass Actors from "Sprite":
- Paddle
- Ball
- Paddle2
3. Ball must move by itself and bounce off the walls and the Paddles.
4. The Paddle must move up and down with the User controlling the mouse.
5. Paddle 2 must move by itself while tracking the Ball.
Virtual Xylophone
Requirements
1. Download and unzip "XylophoneProjectBase" file and Save to your file area.
2. Write Code for "Bar" class that defines 4 variables that control pitch, image, image pressed, and key event.
3. Write Code for "Bar" that defines a Method to play the sound on mouse click and Key event.
4. Write Code for "Bar" that defines a Method to change the image when Bar is clicked or Key is pressed.
5. Write Code for each xylophone bar that sets the variables and calls the Method to play sound and change image.