org.globalse.arena.sword.engine
Class Sword

java.lang.Object
  |
  +--org.globalse.arena.sword.engine.Sword

public class Sword
extends java.lang.Object
implements GameSetup

The Sword class implements a concrete FRAG-based game, as specified in the GameSetup interface. This class instantiates the game with its algorithmically created world and the mission chosen, and places in it all relevant items and adventurers.

See Also:
GameSetup

Constructor Summary
Sword()
           
 
Method Summary
 void createCharacter(GameManager gameManager)
          Creates a new default character
 void gameJoined(GameManager gameManager)
          Is called when someone new joins the game over the network
 DummyMission getMission()
           
 void initGame(GameManager gameManager)
          Initializes the SWORD game, especially the world, the mission and the items
 void loadCharacter(GameManager gameManager, java.util.Vector v)
           
 void loadGame(GameManager gameManager, java.util.Vector v)
           
 java.util.Vector saveCharacter(GameManager gameManager, java.lang.String playerName)
           
 java.util.Vector saveGame(GameManager gameMan)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sword

public Sword()
Method Detail

initGame

public void initGame(GameManager gameManager)
Initializes the SWORD game, especially the world, the mission and the items
Specified by:
initGame in interface GameSetup
Parameters:
gameManager - the instance of the GameManager
Preconditions:
GameManager != null
See Also:
GameManager

gameJoined

public void gameJoined(GameManager gameManager)
Is called when someone new joins the game over the network
Specified by:
gameJoined in interface GameSetup
Parameters:
gameManager - the instance of the running GameManager
Preconditions:
GameManager != null
See Also:
GameManager

loadGame

public void loadGame(GameManager gameManager,
                     java.util.Vector v)
Specified by:
loadGame in interface GameSetup
See Also:
org.globalse.arena.frag.game.GameSetup#loadGame(java.lang.String)

saveGame

public java.util.Vector saveGame(GameManager gameMan)
Specified by:
saveGame in interface GameSetup
See Also:
org.globalse.arena.frag.game.GameSetup#saveGame()

createCharacter

public void createCharacter(GameManager gameManager)
Creates a new default character

loadCharacter

public void loadCharacter(GameManager gameManager,
                          java.util.Vector v)
Specified by:
loadCharacter in interface GameSetup
See Also:
org.globalse.arena.frag.game.GameSetup#loadCharacter(org.globalse.arena.frag.game.GameManager, java.lang.String)

saveCharacter

public java.util.Vector saveCharacter(GameManager gameManager,
                                      java.lang.String playerName)
Specified by:
saveCharacter in interface GameSetup
See Also:
GameSetup.saveCharacter(org.globalse.arena.frag.game.GameManager, java.lang.String)

getMission

public DummyMission getMission()



This page is hosted by the Chair for Applied Software Engineering of the Technische Universität München.
Imprint (Impressum)