vooga.examples.networking.tictactoe.events
Class GameTiedEvent

java.lang.Object
  extended by vooga.examples.networking.tictactoe.events.GameTiedEvent
All Implemented Interfaces:
IEventHandler

public class GameTiedEvent
extends java.lang.Object
implements IEventHandler

Detects and informs the PlayState when the game ends tied. No network API code.


Constructor Summary
GameTiedEvent(PlayField field, PlayState playState)
          Give GameTiedEvent access to the main PlayField and the PlayState.
 
Method Summary
 void actionPerformed()
          If all 9 spots on the board are filled then tell the PlayState there's a tie.
 boolean isTriggered()
          Check to see if all 9 spots on the board are filled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameTiedEvent

public GameTiedEvent(PlayField field,
                     PlayState playState)
Give GameTiedEvent access to the main PlayField and the PlayState.

Method Detail

actionPerformed

public void actionPerformed()
If all 9 spots on the board are filled then tell the PlayState there's a tie.

Specified by:
actionPerformed in interface IEventHandler

isTriggered

public boolean isTriggered()
Check to see if all 9 spots on the board are filled. Doesn't need to worry about if there's a win or loss in those 9 spots since the GameLostEvent and GameWonEvent are checked before.

Specified by:
isTriggered in interface IEventHandler
Returns:
if all 9 spots on the board are filled