1 package erland.game.tileadventure;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import erland.game.GameEnvironmentInterface;
22 import erland.game.BlockContainerInterface;
23
24 /***
25 * Defines all methods needed for a game model for the game
26 */
27 public interface TileAdventureModelInterface {
28 /*** Begin moving left */
29 void startMoveLeft();
30 /*** Begin moving right */
31 void startMoveRight();
32 /*** Begin moving up */
33 void startMoveUp();
34 /*** Begin moving down */
35 void startMoveDown();
36 /*** Stop moveing left */
37 void stopMoveLeft();
38 /*** Stop moving right */
39 void stopMoveRight();
40 /*** Stop moving up */
41 void stopMoveUp();
42 /*** Stop moving down */
43 void stopMoveDown();
44 /*** Jump */
45 void jump();
46 /***
47 * Initialize model
48 * @param environment Game environment object
49 * @param cont Block container for the game area
50 */
51 void init(GameEnvironmentInterface environment, IrregularBlockContainerInterface cont);
52
53 /*** Start the game */
54 void start();
55
56 /*** Update model */
57 void update();
58
59 /***
60 * Get the active map
61 */
62 MapDrawInterface getMap();
63
64 /***
65 * Get the player object
66 */
67 GameObject getPlayerObject();
68
69 /***
70 * Get number of human controlled players
71 * @return Number of human contolled players
72 */
73 int getNoOfHumanPlayers();
74
75 /***
76 * Check if game has ended
77 * @return true if game has ended
78 */
79 boolean isEnd();
80 /***
81 * Check if it is game over
82 * @return true if it is game over
83 */
84 boolean isGameOver();
85 /***
86 * Check if game has been completed
87 * @return true if game has been completed
88 */
89 boolean isCompleted();
90 /***
91 * Check if game has been started
92 * @return true if game has been started
93 */
94 boolean isStarted();
95 /***
96 * Check if game has been initialized
97 * @return true if game has been initialized
98 */
99 boolean isInitialized();
100 /***
101 * Check if this is a multi player game
102 * @return true if multi player
103 */
104 boolean isMultiplayer();
105
106 /***
107 * Get an information string from the model
108 * @return The information string
109 */
110 String getInfoString();
111 /***
112 * Set a cheat parameter
113 * @param parameter Cheat parameter name
114 * @param value Cheat parameter value
115 */
116 void setCheatModeParameter(String parameter, String value);
117 }