core
Class LectureGame

java.lang.Object
  extended by core.LectureGame

public class LectureGame
extends Object

COntains the application entry points and features parsing and high level method calls for further processing.

Author:
Terje

Nested Class Summary
private  class LectureGame.LoginWindowAdapter
           
 
Field Summary
protected  ClientNetworkThread clientNetwork
           
protected  boolean connectionOK
           
protected  int currentModeActivated
           
protected  GraphicsFacade graphics
           
protected  int inputState
           
protected  boolean lastQuestionInitialized
           
protected  ArrayList loggedOnUsers
           
protected  JFrame loginFrame
           
protected  LoginPanel loginPanel
           
protected  Thread networkThread
           
 
Constructor Summary
LectureGame()
          Initiates the program and login GUI.
 
Method Summary
 int getGameMode()
          Returns the integer indicatring the current game mode.
 ClientNetworkThread getNetworkConnection()
           
 void launchGame(boolean isFullScreen, Dimension dimension, String lectureCode)
          Hides the login window, initiates the selected lecture and intitates the graphicsFacade class for future graphical processing.
 void login(String username, String password)
           
static void main(String[] args)
           
 void netSend(String string)
           
 void networkFailure()
          This method is called if the network connection is not properly initiated.
 void networkStatus(boolean status)
           
 void notifyReadyToReceive()
           
 void parse(String received)
          Parses the input strings nad calls the appropriate method with appopriate inout.
 void setGameMode(int mode)
          Sets the current gameMode.
 void setLastQuestionInitialized(boolean isInitialized)
          Called before posing the last question in order for the logic of the program to know when to display the high score list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connectionOK

protected boolean connectionOK

clientNetwork

protected ClientNetworkThread clientNetwork

networkThread

protected Thread networkThread

loggedOnUsers

protected ArrayList loggedOnUsers

graphics

protected GraphicsFacade graphics

inputState

protected int inputState

loginFrame

protected JFrame loginFrame

loginPanel

protected LoginPanel loginPanel

currentModeActivated

protected int currentModeActivated

lastQuestionInitialized

protected boolean lastQuestionInitialized
Constructor Detail

LectureGame

public LectureGame()
Initiates the program and login GUI.

Method Detail

launchGame

public void launchGame(boolean isFullScreen,
                       Dimension dimension,
                       String lectureCode)
Hides the login window, initiates the selected lecture and intitates the graphicsFacade class for future graphical processing.

Parameters:
isFullScreen -
dimension -
lectureCode -

setLastQuestionInitialized

public void setLastQuestionInitialized(boolean isInitialized)
Called before posing the last question in order for the logic of the program to know when to display the high score list.

Parameters:
isInitialized -

setGameMode

public void setGameMode(int mode)
Sets the current gameMode. Graphics are rendered and result messages are interpreted accoring to this parameter.

Parameters:
mode -

getGameMode

public int getGameMode()
Returns the integer indicatring the current game mode.

Returns:

networkFailure

public void networkFailure()
This method is called if the network connection is not properly initiated. For debugging purposes.


parse

public void parse(String received)
Parses the input strings nad calls the appropriate method with appopriate inout.

Parameters:
received -

login

public void login(String username,
                  String password)

notifyReadyToReceive

public void notifyReadyToReceive()

networkStatus

public void networkStatus(boolean status)

main

public static void main(String[] args)

getNetworkConnection

public ClientNetworkThread getNetworkConnection()

netSend

public void netSend(String string)