|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.webkitchen.brainathlon.gameComponents.Player
public class Player
A person playing the game
| Constructor Summary | |
|---|---|
Player(int playerNumber,
PlayerData playerData)
Creates a new player with the given number, name, channels and midi instrument selection |
|
Player(int playerNumber,
java.lang.String firstName,
int[] channels,
java.lang.Integer instrument)
Creates a new player with the given number, name, channels and midi instrument selection |
|
| Method Summary | |
|---|---|
void |
addSampleListener(IChannelSampleListener listener)
Attach listener to receive notification/copies of all new Samples |
int[] |
getChannels()
|
java.lang.String |
getFirstName()
|
java.lang.Integer |
getInstrument()
|
int |
getPlayerNumber()
|
void |
receiveSample(RawSample rawSample)
Receive the raw sample, and pass it's value along to our listeners |
void |
removeAllSampleListeners()
Remove all listeners from our notification list |
void |
removeSampleListener(IChannelSampleListener listener)
Remove listener from our notification list |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Player(int playerNumber,
PlayerData playerData)
playerNumber - 1 or 2playerData - contains the player's name, channels and midi instrument selection
public Player(int playerNumber,
java.lang.String firstName,
int[] channels,
java.lang.Integer instrument)
playerNumber - 1 or 2firstName - the player's first namechannels - the channels that the player is hooked up toinstrument - the midi instrument number that the player selected| Method Detail |
|---|
public int getPlayerNumber()
public java.lang.String getFirstName()
public int[] getChannels()
public java.lang.Integer getInstrument()
public java.lang.String toString()
toString in class java.lang.Objectpublic void receiveSample(RawSample rawSample)
receiveSample in interface IRawSampleListenerrawSample - our latest EEG raw samplepublic void addSampleListener(IChannelSampleListener listener)
addSampleListener in interface IChannelSampleGeneratorlistener - the observer who wants to receive Samplespublic void removeSampleListener(IChannelSampleListener listener)
removeSampleListener in interface IChannelSampleGeneratorlistener - the observer to removepublic void removeAllSampleListeners()
removeAllSampleListeners in interface IChannelSampleGenerator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||