fi.cs.helsinki.ohtur6.gamemanagement.dartsgamemanagement
Class DartsGameEventHandler

java.lang.Object
  |
  +--fi.cs.helsinki.ohtur6.gamemanagement.GameEventHandler
        |
        +--fi.cs.helsinki.ohtur6.gamemanagement.dartsgamemanagement.DartsGameEventHandler

public class DartsGameEventHandler
extends GameEventHandler


Field Summary
private  int ADD_POINTS
           
private  int CREATE_PLAYER
           
private  int END_GAME
           
private  int FAIL_ADD_POINTS
           
private  int FAIL_CREATE_PLAYER
           
private  int GAME_FINISHED
          indexes of events
private  int VIEW_REPORT
           
 
Constructor Summary
DartsGameEventHandler()
           
 
Method Summary
 int haveEvent(int event, GameEventComponent gec)
          This is the main event handler.
 
Methods inherited from class fi.cs.helsinki.ohtur6.gamemanagement.GameEventHandler
addPoints
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GAME_FINISHED

private final int GAME_FINISHED
indexes of events

See Also:
Constant Field Values

ADD_POINTS

private final int ADD_POINTS
See Also:
Constant Field Values

CREATE_PLAYER

private final int CREATE_PLAYER
See Also:
Constant Field Values

FAIL_CREATE_PLAYER

private final int FAIL_CREATE_PLAYER
See Also:
Constant Field Values

FAIL_ADD_POINTS

private final int FAIL_ADD_POINTS
See Also:
Constant Field Values

VIEW_REPORT

private final int VIEW_REPORT
See Also:
Constant Field Values

END_GAME

private final int END_GAME
See Also:
Constant Field Values
Constructor Detail

DartsGameEventHandler

public DartsGameEventHandler()
Method Detail

haveEvent

public int haveEvent(int event,
                     GameEventComponent gec)
Description copied from class: GameEventHandler
This is the main event handler. Each game must implement this to provide its own set of events.

Specified by:
haveEvent in class GameEventHandler
Parameters:
event - defines the event number to be given.
gec - is a reference to EventComponent where the event originated from.
Returns:
returns the new state of the game
See Also:
GameEventHandler.haveEvent(int, fi.cs.helsinki.ohtur6.gui.GameEventComponent)

(c) ohtuR6