The Fish Game Java Case Study
January 27, 2014
2 Learning outcomes
3 Information of the video game
4 The classes of the software
your five The lab exercise and optional extra features
six High level design and style, and development approach
7 Concept: model, perspective and control
eight Separating actions and graphic: design policy
being unfaithful Development of Course
9. 1 Varying and technique interface styles...................... 12 being unfaithful. 2 Code for Direction............................... 13 10 Development of Cellular and CellImage
10. 1 Varying and technique interface designs...................... 17 15. 2 Code for Cell................................... 20 11 Development of Game and GameImage
10. 1 Technique interface models............................. 25 doze Development of SpeedController
doze. 1 Varying and technique interface designs...................... 29 13 Development of AboutBox
16 Development of GameGUI
16. 1 Method interface models............................. 30 15 Development of the best level class Snake
This case research presents much of the development of an application to play a snake video game, similar to that found on specific old mobile phones. The main game playing operation is actually left as a taking place laboratory work out.
2 Learning outcomes
The intentions on this case study will be as follows.
вЂў To reinforce a lot of the Java and programming ideas you have already met. вЂў To provide useful experience of the style and execution of a large system. вЂў To realise a framework for a more challenging, and thus rewarding, lab exercise. While there is no substitute for writing the own applications, watching the development of another's remains to be an extremely effective way of collecting design and programming encounter, particularly while the applications can be a little more difficult than those you can write your self at this stage. (Caveat: this is only the case for case studies that you will be not supposed to be doing yourself вЂ“ seeing someone else develop code that you will be supposed to be undertaking on your own is disastrous for your learning! )
How much you get from this case study depends upon how much you put in. Essentially you should cautiously follow every part of it and check your depth of understanding at every option. All chambardement or misconceptions which it may reveal should be dealt with immediately.
3 Information of the game
The game is just like snake upon mobile phones (which is similar to a game played on Unix three decades ago), good results . some вЂimprovements'.
The game is definitely played by one participant, who has the goal of obtaining the maximum score likely. The player is in control of a snake which is constantly getting around a square п¬Ѓeld of cells. The size of the fish is a whole number of skin cells. At any time, the snake moves in one of the some directions, seite an seite to a aspect of the square, and the participant can change the direction making use of the 4 arrow keys of the keyboard. In case the snake fails into a aspect, or in itself, it is dead, and the video game stops.
Likewise in the п¬Ѓeld is a sole piece of foodstuff. When the mind of the snake hits this kind of, the food can be eaten, as well as the snake turns into one cell longer. This increases the rating of the player. At a couple of
the same time, a fresh piece of food is placed in a randomly chosen cell somewhere in the п¬Ѓeld, which was recently clear (empty).
The game contains a score concept bar, educating the player what is the current rating, and also a one message which in turn changes every once in awhile. For example , when food can be eaten the participant is up to date how much rating was just obtained, and when the fish crashes an appropriate message...