|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.webkitchen.brainathlon.gameControl.AbstractCourse
public abstract class AbstractCourse
Contains the generic logic for all Brainathlon courses
| Nested Class Summary | |
|---|---|
protected class |
AbstractCourse.AbstractPlayerMonitor
AbstractPlayerMonitor monitors and scores a given Player's brainwave activity |
| Field Summary | |
|---|---|
protected boolean |
announceCourse
|
protected boolean |
courseOver
|
protected CourseOverUI |
courseOverUI
|
protected java.lang.String |
courseTitle
|
protected AbstractCourseUI |
courseUI
|
protected PlayerMonitorList |
playerMonitorList
|
protected java.util.List<Player> |
players
|
protected boolean |
running
|
protected Range |
scoreRange
|
protected boolean |
timedCourse
|
protected int |
timeInCourse
|
protected int |
timeLimit
|
protected Player |
winner
|
| Constructor Summary | |
|---|---|
AbstractCourse(java.util.List<Player> players)
|
|
| Method Summary | |
|---|---|
protected void |
attachAsListener(java.awt.Window window)
Subclasses should all use this to listen for window events that we need to handle |
protected abstract void |
attachMonitors()
|
protected abstract void |
createCoefficients(FilterDesigner designer)
|
protected void |
designFilters()
Designs IIR filter coefficients if they weren't specified in the configuration file |
protected static void |
dumpCoefficients(java.lang.String name,
double[] coef)
|
protected abstract AbstractCourseUI |
getCourseUI()
|
FinalScore |
getFinalScore()
|
int |
getFinishTime()
|
abstract PlayerMonitorList |
getPlayerMonitorList()
|
Range |
getScoreRange()
|
java.lang.String |
getTitle()
|
Player |
getWinner()
|
protected abstract boolean |
needCoeffients()
|
protected void |
playerWon(Player player)
Set the winner |
void |
start()
Start the game, and do not return until the game is finished |
void |
stop()
|
protected void |
tick()
Called after timeInCourse is updated, subclasses should override to add timing-based game functionality |
void |
windowActivated(java.awt.event.WindowEvent e)
|
void |
windowClosed(java.awt.event.WindowEvent e)
|
void |
windowClosing(java.awt.event.WindowEvent e)
|
void |
windowDeactivated(java.awt.event.WindowEvent e)
|
void |
windowDeiconified(java.awt.event.WindowEvent e)
|
void |
windowIconified(java.awt.event.WindowEvent e)
|
void |
windowOpened(java.awt.event.WindowEvent e)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List<Player> players
protected Player winner
protected boolean running
protected boolean courseOver
protected boolean timedCourse
protected boolean announceCourse
protected int timeInCourse
protected int timeLimit
protected PlayerMonitorList playerMonitorList
protected CourseOverUI courseOverUI
protected AbstractCourseUI courseUI
protected java.lang.String courseTitle
protected Range scoreRange
| Constructor Detail |
|---|
public AbstractCourse(java.util.List<Player> players)
| Method Detail |
|---|
public abstract PlayerMonitorList getPlayerMonitorList()
protected abstract void attachMonitors()
protected abstract AbstractCourseUI getCourseUI()
protected abstract boolean needCoeffients()
protected abstract void createCoefficients(FilterDesigner designer)
protected void designFilters()
public void start()
public Range getScoreRange()
public FinalScore getFinalScore()
public Player getWinner()
public int getFinishTime()
protected void tick()
protected void attachAsListener(java.awt.Window window)
window - the Window to listen toprotected void playerWon(Player player)
player - the player who won
protected static void dumpCoefficients(java.lang.String name,
double[] coef)
public void windowClosing(java.awt.event.WindowEvent e)
windowClosing in interface java.awt.event.WindowListenerpublic void windowOpened(java.awt.event.WindowEvent e)
windowOpened in interface java.awt.event.WindowListenerpublic void windowClosed(java.awt.event.WindowEvent e)
windowClosed in interface java.awt.event.WindowListenerpublic void windowIconified(java.awt.event.WindowEvent e)
windowIconified in interface java.awt.event.WindowListenerpublic void windowDeiconified(java.awt.event.WindowEvent e)
windowDeiconified in interface java.awt.event.WindowListenerpublic void windowActivated(java.awt.event.WindowEvent e)
windowActivated in interface java.awt.event.WindowListenerpublic void windowDeactivated(java.awt.event.WindowEvent e)
windowDeactivated in interface java.awt.event.WindowListenerpublic void stop()
public java.lang.String getTitle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||