edu.gatech.cs2335.lemmings.engine
Class EstablishingConnectionState

java.lang.Object
  extended byedu.gatech.cs2335.lemmings.engine.AbstractGameState
      extended byedu.gatech.cs2335.lemmings.engine.EstablishingConnectionState
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class EstablishingConnectionState
extends AbstractGameState

Class EstablishingConnectionState: This state will load a level, and then wait for a connection to be established. After both of the conditions are met, it will go on to the actual game.

 Revision History:
     v1.0 (Apr. 15, 2004) - Created the EstablishingConnectionState class
 

Version:
Version 1.0, Apr. 15, 2004
Author:
Vladimir Urazov

Constructor Summary
EstablishingConnectionState()
          Creates a new EstablishingConnectionState instance.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          This function essentially processes the action event that may have been thrown by the UI.
 boolean cleanUp()
          This method will perform all of the necessary clean up operations once the object is no longer needed.
 void connectTo(java.lang.String hostt, int portt)
          Describe connectTo method here.
 int getLemmingCount()
          Get the value of lemmingCount.
 void host(int portt)
          Describe host method here.
 boolean initialize()
          This method will initialize the state that it belongs to.
 void loadLevel(java.lang.String id)
          Loads the level with the specified id.
 void setLemmingCount(int v)
          Set the value of lemmingCount.
 
Methods inherited from class edu.gatech.cs2335.lemmings.engine.AbstractGameState
getUI, setUI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EstablishingConnectionState

public EstablishingConnectionState()
Creates a new EstablishingConnectionState instance.

Method Detail

initialize

public boolean initialize()
This method will initialize the state that it belongs to. It will then return true upon success, and false upon failure.

Specified by:
initialize in class AbstractGameState
Returns:
boolean

cleanUp

public boolean cleanUp()
This method will perform all of the necessary clean up operations once the object is no longer needed.

Specified by:
cleanUp in class AbstractGameState
Returns:
boolean

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
This function essentially processes the action event that may have been thrown by the UI.

Parameters:
ae - ae

getLemmingCount

public int getLemmingCount()
Get the value of lemmingCount.

Returns:
value of lemmingCount.

setLemmingCount

public void setLemmingCount(int v)
Set the value of lemmingCount.

Parameters:
v - Value to assign to lemmingCount.

connectTo

public void connectTo(java.lang.String hostt,
                      int portt)
Describe connectTo method here.

Parameters:
hostt - a String value
portt - an int value

host

public void host(int portt)
Describe host method here.

Parameters:
portt - an int value

loadLevel

public void loadLevel(java.lang.String id)
Loads the level with the specified id.

Parameters:
id - a String value