(word counts: 500 number of figures: 3)
[TOC]
1.1.1 event
I applied factory design pattern for game events.
One eventHandleInterface.java
interface, one eventFactory.java
factory and 9 entities: closeGame, loadGame, resetLevel, saveGame, showAbout, showVictoryMessage, toggleDebug, toggleMusic and undo
1.1.2 music
I applied factory pattern for two kinds of music: background music and bomb music.
One Music.java
interface, one MusicFactory.java
factory and 2 entities: backgroundMusic and bombMusic.
1.1.3 engine
I applied factory pattern to move functions:
One abstract class Engine.java
, one factory engineFactory.java
and three entities: moveEngine, moveRedEngine and removeObject
I applied MVC for GUI design pattern.
2.1.1 In InfoScreen.fxml view:
2.1.2 In StartScreen.fxml view:
2.1.3 In TouristMode.fxml view:
3.1.1 complete toggle music function
I use an integer variable toggleMusicTimes
to count the click times.
3.1.2 complete undo function
I use an ArrayList<String>
to store all current levels and if user choose undo, remove the last element and assign the newly last element value to current level then reload game grid.
3.1.3 complete reset level function
I use the ArrayList<String>
created in undo
3.1.4 complete save game function
I write the levels including current level and the remaining to a new .skb
file.
3.1.5 correct codes
I corrected some codes for passing game levels.
3.1.6 remove unused codes
I divided whole program codes into four big packages: controller, entity, enums and util.
I made some fields to be private in a package.
1. high score
A Top5 high scores dialog after each game level (5 minimum moves counts), and Top1 if there are less than 5 playing times.
2. start screen
A start screen with background and two button: Start, Info.
A screen shows how to play this game.
Keepers can be transfered from one door to another side.
5. ice floor
Keepers cannot stand on the ice floor.
6. double mode
Provide red and blue two keepers.
Keepers can use bomb to blow up any object in four directions (up, down, right, left)
8. shortcut key
all functions at menu bar have their own corresponding shortcut key.
LevelName: Add a new Level ~ as the final game level
10. add UI
add pictures for game objects
11. add Maven
A ae2dms-cw-20126518-1.0-SNAPSHOT.jar
package used to run program directly.