Class Fod

Class Fod

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----Fod

public class Fod
extends Thread
Version:
1.0 The game serverclass, here is all the processing between turns done.
Author:
Nicklas Hjalmarsson

Constructor Index

 o Fod()

Method Index

 o baptizeHatchlings()
Used to give a unique name to new dragons
 o castSpells()
process the spelleffects that have been cast during the turn.
 o endGame()
Call this function to en the game do not call stop use this instead
 o executeMissions(Hashtable)
Let the dragon do its mission, conquer cities, search for talisman or whatever
 o gameOverCheck()
Check if a player is dead or a player has found all talismans
 o getInfo()
Wait for the clients to send data.
 o Go()
Use to startup the game
 o init(Vector)
Called to initialize the game after all players have connected
 o main(String[])
This isnt used for other things than testing
 o moveUnits(Hashtable)
Moves the dragons and checks and process battles if they occur
 o run()
This is the main loop that call most of the other functions.
 o serverProcess()
This function checks if a city is about to revolt or if it should colonize a new area
 o updatePlayers()
Send information back to the clients

Constructors

 o Fod
  public Fod()

Methods

 o init
  public void init(Vector threads)
Called to initialize the game after all players have connected
 o endGame
  public void endGame()
Call this function to en the game do not call stop use this instead
 o Go
  public void Go()
Use to startup the game
 o updatePlayers
  public void updatePlayers()
Send information back to the clients
 o moveUnits
  public void moveUnits(Hashtable u)
Moves the dragons and checks and process battles if they occur
 o executeMissions
  public void executeMissions(Hashtable u)
Let the dragon do its mission, conquer cities, search for talisman or whatever
 o getInfo
  public void getInfo()
Wait for the clients to send data.
 o baptizeHatchlings
  public void baptizeHatchlings()
Used to give a unique name to new dragons
 o serverProcess
  public void serverProcess()
This function checks if a city is about to revolt or if it should colonize a new area
 o gameOverCheck
  public void gameOverCheck()
Check if a player is dead or a player has found all talismans
 o castSpells
  public void castSpells()
process the spelleffects that have been cast during the turn.
 o run
  public void run()
This is the main loop that call most of the other functions.
Overrides:
run in class Thread
 o main
  public static void main(String args[])
This isnt used for other things than testing