java.lang.Objectgreenfoot.Actor
Recorder
public class Recorder
The recorder keeps track of how many letters have been pressed and can tell if all have been pressed.
| Constructor Summary | |
|---|---|
Recorder()
Creates an instance of the Recorder with an empty collection of letters already pressed. |
|
| Method Summary | |
|---|---|
void |
act()
Act - do whatever the Recorder wants to do. |
boolean |
allPressed()
This method returns true when all the letters have been pressed, false otherwise. |
void |
keyPressed(java.lang.String key)
Call this method whenever a key is pressed by the user so that the recorder records that the key has been pressed. |
| Methods inherited from class greenfoot.Actor |
|---|
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 Recorder()
| Method Detail |
|---|
public void act()
act in class greenfoot.Actorpublic boolean allPressed()
public void keyPressed(java.lang.String key)