I really, really need help to do this!! please!!.
Lab 5 - Chubby cat
Objective: Build a computer game with FatCat
How's the game works: Pizzas begin to fall from the sky. You're using the keyboard to control moving the cat left and right. Once your cat is catching the pizza it begins to eat. Once the cat finishes eating cat should continue to try and catch more pizza within a certain time. When the time runs out, end the game and displayed the number of pizza slices eaten.
The game sounds simple but requires programming effort and investment. The instructions here are designed to help you with the steps to program the game. There are three parts to this game.
Part I: Pizza actor
This class is a slice of pizza. The pizza is falling toward the floor, with rotation about the central axis to give the feeling of a fall. After reaching the lower edge of the screen, it disappears from the world.
Pizza task list:
1. Falling pizza will a swivel on a central axis.
2. Delete the object after leaving the scope of the world.
Method Table
Task

Name of Method
Define the new location of the pizza. Sometimes the pizza will move slightly left and right horizontally.
Pizza always falls at the same speed.
Set up a small rotation on its axis.
Hints:
Greenfoot.getRandomNumber setLocation
setRotation
public void falling()
The pizza will be removed if it hits the edge of the World.
Hints:
getY ()
getWorld () getHeight () removeObject (this)
public void checkForMiss()
Call these two methods one after the other.
This method looks all the time that the software performs so it's like an infinite loop
public void act()
Part II : catWorld
This class defines the role of the world scenario and add objects.
catWorld task list:
1. This class will create the world.
2. Create and add to the world the cat.
3. To remove the pizzas being added to the world with a chance of 2% - from the top of Y axis at the position 0. X is given a random location on the axis.
Task
Name of Method
sets size to(500,700)
The builder also adds to the world the new cat location (45,450).
public catWorld()
Add a new slice of pizza with a random chance of 2%. Start the image at a y coordinate of 0. X should be random.
Hints: Greenfoot.getRandomNumber addObject()
public void act()
Part III – Cat Actor
This class defines the role cat behavior. Our cat can move only right and left (horizontal axis) using the keyboard. Movement is in the form of walking. Use the two images to make it look like walking. Once the cat and the Pizza Triangle meets, he sits and eats. After he finished eating, he can continue to move. Within the scenario directory there are several pictures which helped.
Use the following images
Cat sitting. - Cat-sit.png
The cat goes to the left 1 – cat-walk-left.png The cat goes dress 2 - cat-walk-left2.png The cat goes right 1 - cat-walk-right.png The cat goes right 2 - cat-walk-right2.png Cat food 1 - cat-eat.png
Cat food 2 – cat-eat2.png
1. The cat will move back and forth with images changing.
2. If your cat meets a pizza, a cat eats it and deletes the distributed object from the world. Then it performs a series of pictures to show. After Finishing eating it just sits and waits for a keyboard command.
Task

Name of method
Constructor, the object whose job is to build a cat.
Create a series of global variables of type GreenfootImage above this method. For example: private GreenfootImage cat_sit;
Then in the constructor to write
cat_sit = new GreenfootImage ("cat-sit.png");
public Cat()
Set an inital image for the Cat.
Every time the pizza is eaten show the images of a cat eating and then sitting. Add the code to change eating images.
If an pizza object is eaten delete it and then replaced the image. Delete the comments I wrote / /.
public void eat(Class clss)
Left and right movement while changing the pictures.
If the right button is pressed on the keyboard, replace the image of walking to the right one, using the two images cat_walk_right and cat_walk_right2
Set new horizontal position to the right.
If the left button is pressed on the keyboard, replace the image walking to the left one using the two images cat_walk_left and cat_walk_left2
Set a new horizontal to the left.
If the right button and left button is not pressed, then Change picture cat sitting.
public void move()
Verifies whether a the cat can see the pizza and returns a Yes / No respectively.
public boolean canSee(Class clss)
Checks to see if you can see pizza. Move method calls if she can see a slice of pizza
Public void act()

