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