java.lang.Objectgreenfoot.Actor
Cat
public class Cat
A cat. Can do some things cats do. Or not.
Constructor Summary | |
---|---|
Cat()
|
Method Summary | |
---|---|
void |
dance()
Do a dance. |
void |
eat()
Eat some pizza! |
boolean |
hasCompany()
Return true if the cat is not alone here. |
boolean |
isAlone()
Return true if the cat is alone here. |
boolean |
isBored()
Return true if the cat is bored. |
boolean |
isHungry()
Return true if the cat is hungy. |
boolean |
isSleepy()
Return true if the cat is sleepy. |
void |
shoutHooray()
It's really what the method name says: shout "Hooray". |
void |
sleep(int howLong)
Sleep for a while. |
void |
wait(int time)
Wait for a given time. |
void |
walkLeft(int distance)
Walk a bit to the left. |
void |
walkRight(int distance)
Walk a bit to the right. |
Methods inherited from class greenfoot.Actor |
---|
act, addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getX, getY, intersects, setImage, setImage, setLocation, setRotation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cat()
Method Detail |
---|
public void dance()
public void eat()
public boolean hasCompany()
public boolean isAlone()
public boolean isBored()
public boolean isHungry()
public boolean isSleepy()
public void shoutHooray()
public void sleep(int howLong)
public void wait(int time)
public void walkLeft(int distance)
public void walkRight(int distance)