1
2
3
4 package spellcast.game;
5
6 import java.util.List;
7
8 import spellcast.beings.IMonster;
9 import spellcast.beings.IWizard;
10
11 /***
12 * The Spellcast Game.
13 *
14 * @author Barrie Treloar
15 * @version $Revision: 1.1 $
16 */
17 public interface IGame {
18
19 /***
20 * Return the game name.
21 *
22 * @return the game name.
23 */
24 String getName();
25
26 /***
27 * Get the value of turn.
28 *
29 * @return value of turn.
30 */
31 Turn getTurn();
32
33 /***
34 * Get the value of gameLog.
35 *
36 * @return value of gameLog.
37 */
38 GameLog getGameLog();
39
40 /***
41 * The <code>IMonster</code>s currently in the arena.
42 *
43 * @return The <code>IMonster</code>s currently in the arena.
44 */
45 List<IMonster> getMonsters();
46
47 /***
48 * The <code>IWizard</code>s currently in the arena.
49 *
50 * @return The <code>IWizard</code>s currently in the arena.
51 */
52 List<IWizard> getWizards();
53
54 /***
55 * Set the the curent turn for the game.
56 *
57 * @param theTurn
58 * the curent turn for the game
59 */
60 void setTurn(Turn theTurn);
61
62 /***
63 * Process the current turn.
64 */
65 void processTurn();
66
67 /***
68 * Add a wizard to the system.
69 *
70 * @param w
71 * Wizard to add to the game.
72 */
73 void addWizard(IWizard w);
74
75 /***
76 * Remove a wizard from the system.
77 *
78 * @param w
79 * Wizard to remove from the game.
80 */
81 void removeWizard(IWizard w);
82
83 /***
84 * Returns whether the game has started. The game has started if the current
85 * turn is no longer Turn.BEFORE_GAME.
86 *
87 * @return true if the game has started, false otherwise.
88 */
89 boolean hasStarted();
90
91 /***
92 * Returns whether the game has finished. The game has finished if the
93 * current turn is Turn.AFTER_GAME. A game can be started as well as
94 * stopped.
95 *
96 * @return true if the game has finished, false otherwise.
97 */
98 boolean hasFinished();
99
100 }