FROG

FROG Recognizer of Gestures

Player Class Reference

Represents a single player of the DemoGame. More...

Inheritance diagram for Player:
Collaboration diagram for Player:

List of all members.

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.

Author:
Team Better Recognize

Constructor & Destructor Documentation

Player ( DemoGame  game,
User  user,
int  index 
)

Creates a new Player.

Parameters:
game the DemoGame this Player is a participant in.
user the User from the FROGUI that contains the Session to be listened to.
index the player's number.

Here is the call graph for this function:


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 (  ) 

Disposes this Player object by removing it as a listener to its Session object.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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 (  ) 

Returns the User object associated with this Player.

Returns:
the User object associated with this Player.
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
 All Classes Namespaces Files Functions Variables