Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 3.88 KB

F16_lab03.md

File metadata and controls

45 lines (31 loc) · 3.88 KB

<<<<<<< HEAD Huiyang He, Ziheng Song

Fall2016 Lab03

Huiyang He, Ziheng Song

  1. A brief description: The fish animation launchs a game in which you can control a shark (or a white whale) with your mouse or arrow key. You may want to reach 50 points by controlling the shark to eat fish and avoid jellyfish during the game.

  2. User stories:

  • as a player, I can use the mouse or arrow keys to control a shark to eat fish and avoid jellyfish;
  • as a player, I can choose the difficulty in the menu;
  • as a player, I can pause my game so that I can answer the phone;
  • as a player, I can control the shark to eat fish so that I get game points;
  • as a player, I can choose either to play as a white whale or shark, so that it is more interesting;
  • as a player, I can control the shark to avoid jellyfish, so that I won't lose the game;
  • as a player, I can read the instruction, so that I know how to play the game.
  1. The game fish animation can run and have a simple instruction for the player. It has a complete game logic, but the instruction is insufficient.

  2. User sotries to make it more fun:

  • as a player, I may hope I can choose the game mod, so that I can play in either sandbox or normal mod;
  • as a player, I may want to boost the speed from time to time, so that I can easily avoid the jellyfish or eat more fish;
  • as a player, I may expect some features (like eating a trash) that subtract the points so that the game is more challanging;
  • as a player, I may want various fish that gives me different points, so that the game is more interesting;
  • as a player, I may want the fish to have a simple AI(the fish escapes if you try to get close to them), so that the game is more challanging.
  1. The current README.md is good, it bascilly descibe some issues we can develop to make the project better. Some extra information about the functions of each file may be helpful for the next generation.

  2. The current targets in build.xml are run, runEnv, compile, clean, run-from-jar,and javadoc. The jar and run-from-jar don't have description, and runEnv doesn't work. Also, it seems that javadoc needs to be updated to produce a right javadoc.

  3. Currently, there are 19 issues. There are enough issues to get us 1000 points. All the issues have pretty clear descriptions.

  4. There are enough issues to get us 1000 points, and nothing good has come up to our mind at this point.

  5. Curretly, the program has a pretty clear structure, and the methods are easy to understand.

There are GAME LOGIC classes: Score Classes(Score, ScoreManager and ScoreComparer), ScumOftheSea Classes(ScumOftheSea, JellyFish, Fish, Shark) and Bubbles Class. There are also GUI classes: Menu calss, GeneralPathWrapper class.

The bulk of code is in class FishAnimationEnvironment which seems to be a mix of GAME Logics and GUI stuffs: there are many private members to hold the game data, some methods to draw and show the in-game menu and the score menu, and also some eventListeners. Although it does not separate the GAME LOGIC from GUI, all of its methods are still pretty intuitive and the connections of this class with other classes are very clear.

In class FishAnimationEnvironment, custom constructor creats a JFrame and a Jpanel, and it takes in input from the Menu GUI for the difficulty and creates Jellyfish based on the selected difficulty. DrawingPanel is an innerclass for a custom Jpanel that draws out the background and the in-game components. Class Animate can animate the game to get the fish and bubbles to move. Class KeyHandler can handle key events and class MouseHandler can handle mouse events. Class GameMenu creats an in game menu.

  1. There's no Junit Test at this point. There are opportunities to add Junit Test, but since the game is almost complete, the easiest way to test our code may be just to run the game and see whether it works or not.

35e8bace2d4cd8dc7662fee8ba819d611e654294