public class GameController
extends java.lang.Object
| Constructor and Description |
|---|
GameController(GameData data,
GameView view,
CombatEngine engine)
The GameController needs all major components of the game to work - view, data and combat
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
processCommand(java.lang.String command)
Setup as a helper method for
start() }, processes commands the client passes
in through GameView.displayMainMenu(). |
void |
start()
Starts the game, causing it to run until a client exits.
|
public GameController(GameData data, GameView view, CombatEngine engine)
data - GameData - does not care the type (CSV, JSON, etc), just the abstract classview - GameView - calles the various methods based on feedback from dataengine - runs combat between an active knight group and MOBspublic void start()
GameView.displayMainMenu()protected boolean processCommand(java.lang.String command)
start() }, processes commands the client passes
in through GameView.displayMainMenu(). The following command combinations are allowed:
GameData.getActiveKnights()
engine.initialize();
engine.runCombat();
engine.clear();
}command - command to process.