Class Cat

java.lang.Object
  extended by greenfoot.Actor
      extended by Cat

public class Cat
extends greenfoot.Actor

A cat. Can do some things cats do. Or not.

Version:
1.0
Author:
mik

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

Cat

public Cat()
Method Detail

dance

public void dance()
Do a dance. Cool, Baby! (Dancing makes you tired.)


eat

public void eat()
Eat some pizza!


hasCompany

public boolean hasCompany()
Return true if the cat is not alone here.


isAlone

public boolean isAlone()
Return true if the cat is alone here.


isBored

public boolean isBored()
Return true if the cat is bored.


isHungry

public boolean isHungry()
Return true if the cat is hungy.


isSleepy

public boolean isSleepy()
Return true if the cat is sleepy.


shoutHooray

public void shoutHooray()
It's really what the method name says: shout "Hooray".


sleep

public void sleep(int howLong)
Sleep for a while. The parameter determines how long to sleep. Use small numbers. A value of 1 will sleep for a couple of seconds or so.


wait

public void wait(int time)
Wait for a given time.


walkLeft

public void walkLeft(int distance)
Walk a bit to the left. 'distance' determines how far to walk. Use small numbers (1 to 10).


walkRight

public void walkRight(int distance)
Walk a bit to the right. 'distance' determines how far to walk. Use small numbers (1 to 10).