Player Class Reference
Represents a single player of the DemoGame. More...


Public Member Functions | |
| Player (DemoGame game, User user, int index) | |
| Creates a new Player. | |
| void | addPoints (int points) |
| Adds a given number of points to this user's score. | |
| void | dispose () |
| Disposes this Player object by removing it as a listener to its Session object. | |
| String | getName () |
| Returns the name of this Player. | |
| int | getScore () |
| Returns this Player's current score. | |
| User | getUser () |
| Returns the User object associated with this Player. | |
| void | accelerationPerformed (AccelEvent e) |
| Executed whenever a Session detects an acceleration from a Device it is listening to. | |
| void | gestureComplete (boolean good, Device d) |
| Executed whenever a Session detects a complete gesture from a Device it is listening to. | |
| void | gestureRecognized (GestureModel g) |
| Executed whenever a Session has recognized a gesture performed by the Device it is listening to (requires being in recognition mode). | |
| void | unexpectedDisconnect (Device d) |
| Executed whenever a Session detects an unexpected disconnect from a Device it is listening to. | |
Detailed Description
Represents a single player of the DemoGame.
A Player object holds a reference to the player's Session so that when recognition is performed, the recognized GestureModel can be used to see which UFO should be deleted.
Constructor & Destructor Documentation
Member Function Documentation
| void accelerationPerformed | ( | AccelEvent | e | ) |
Executed whenever a Session detects an acceleration from a Device it is listening to.
Implements SessionListener.
| void addPoints | ( | int | points | ) |
Adds a given number of points to this user's score.
- Parameters:
-
points amount of points to give to the player.
| void dispose | ( | ) |
| void gestureComplete | ( | boolean | good, | |
| Device | d | |||
| ) |
Executed whenever a Session detects a complete gesture from a Device it is listening to.
Implements SessionListener.
| void gestureRecognized | ( | GestureModel | g | ) |
Executed whenever a Session has recognized a gesture performed by the Device it is listening to (requires being in recognition mode).
- Parameters:
-
g The gesture recognized
- See also:
- Session.inRecognitionMode()
Implements SessionListener.

| String getName | ( | ) |
Returns the name of this Player.
- Returns:
- this Player's name.
| int getScore | ( | ) |
Returns this Player's current score.
- Returns:
- this Player's current score.
| User getUser | ( | ) |
| void unexpectedDisconnect | ( | Device | d | ) |
Executed whenever a Session detects an unexpected disconnect from a Device it is listening to.
Implements SessionListener.
The documentation for this class was generated from the following file:
- /Users/dev/Documents/SVN brazos.cs.tcu.edu/trunk/FROG/src/frog/demo/Player.java


