CSE 115 - Fall 2006 - Banner
   CSE 115 - Fall 2006 - Introduction to Computer Science for Majors I
CSE 115 - Fall 2006 - Left Navigation CSE 115 - Fall 2006 - Lab 10

Lab 10 - Section C

(Note: If you are looking for Section A & B's Lab 10, go here.)

Introduction

With every final lab, there is always a story. This final lab is no different. One day, Adrienne, Carl, Mike K, Clark, Chris, and Mark were sitting around lamenting the fact that there were no good games to play anymore.

As everyone went around the room, it became clear that the idea "cool" games was a topic like politics and religion (to be avoided in groups larger than one). Carl was all about Pong, while Adrienne expressed affinity towards Tetris and PacMan. Clark argued for the original Mario Bros, and Chris and Mark kept low-key (they're the new guys and the conversation was already pretty heated). Mike K sat back smugly (as he usually does) knowing full well that he had the definitive resolution to the conflict and the answer to our students wishes to make a program that is interesting.

It combined the skill of Tetris with the character attachment of Mario Bros, with some additional twists. As he revealed what he was feverishly producing on his laptop. We all knew he had won yet another debate. He created the legendary, and totally awesome Dr. Mario. What's not to love? We had to give it to Mike K. He's got some of the best ideas, or at least he is really good at telling us when our ideas are too corny.

It took some convincing. Carl was jumping up and down to get his way, but in the end, we agreed - Dr. Mario was it! Now it's up to you. Step up to the challenge and code away!


New Concepts Covered

The following are the new concepts covered in this lab.
  • Collections of objects
  • primitive types (boolean, int)
  • control structures
    • if statement
    • for and while loop
  • Design Patterns
    • State pattern
    • Proxy pattern
    • Iterator pattern


Hints/Advice

The new concepts will be covered in lecture and in recitation. If you do not attend both lecture and recitation, you will find this lab significantly more challenging. Lecture material will be presented in the context of this lab, or in a similar and related context. It is imperative that you start this lab right away. This is, by far, the most challenging lab of the semester, and it will be figured accordingly into your final grade. The instructors and TAs will be happy to help those who heed this advice, but will grow short-tempered with those who seek beginner's help just prior to the due date.


Lab Tasks

Create a new project in Eclipse

As with Lab 9, you should create your own project and name the project Lab10 and the package inside it lab10. Refer to the Lab 9 directions if you do not remember how to do this.


Assignment Specification

If you have never played Dr. Mario, your first task for the assignment is to play it. Go to this site and try it out for yourself.

In this assignment, you will be able to complete basic functionality for a possible score of 100, or complete basic functionality plus extra credit for a possible score greater than 100. It is most important that you complete the basic functionality before attempting the extras. Note that, even in the Submission Directions, you must submit a basic game separate from the game with extras.

Basic requirements (100 points)

The basic requirements are:

  • For a grade of F [48 points] Basic gameboard requirements:
    • A game window appears at start up that does not have the board configuration showing [2 points], but does provide:
      [2 points] A way for the user to start the game
      [2 points] Directions about how the user should move the falling pills
      [2 points] Directions about how the user can pause the game
      [2 points] The ability to end the game (quit functionality)
  • When the user presses start:
    • [10 points] The game board should appear with 10 viruses scattered about the screen. No viruses should be in the four top-most rows of the game board. Viruses should appear in three different colors.
    • [5 points] A pill appears on the screen in the center of the top row of the board.
    • [5 points] The pill should begin moving down when the game begins.
  • A pause/unpause game functionality should be implemented so that when a user selects to pause the game, all of the animated elements stop moving [3 points] and the currently dropping pill disappears [5 points] from the screen. Unpausing the game resumes normal game functionality [5 points].
  • For a grade of D [51 points] Implement all of the above plus:
    • [3 points] Pill stops moving when it hits the bottom of the screen.
  • For a grade of C- [56 points] Implements all of the above plus:
    • [5 points] Pill is controlled by the player with the keyboard and reacts properly (i.e. - doesn't go through the two side walls)
  • For a grade of C+ [65 points] Implement all of the above plus:
    • [3 points] When one pills stops another appears on the screen and is able to be controlled by the user.
    • [6 points] Implementation of the Proxy pattern used to complete this operation.
  • For a grade of B- [71 points] Implement all of the above plus:
    • [6 points] Pills stop when they land on other pills or viruses.
  • For a grade of B [76 points] Implement all of the above plus:
    • [5 points] If a pill comes to rest in any column of the top row of the game, the game is over.
  • For a grade of B+[81 points] Implement all of the above plus:
    • [5 points] When the user has four pills, pill segments, or viruses that land on top of one another that have the same color, all four items disappear.
  • For a grade of A-[88 points] Implement all of the above plus:
    • [7 points] When the pills have broken in half, the other halves of the pills drop down as far as they can go on the screen.
  • For a grade of A[100 points] Implement all of the above plus:
    • [7 points] Pills can be controlled by the user to rotate from horizontal to vertical positions by using a key on the keyboard.
    • [5 points] When all of the viruses have been removed from the screen, the user has completed that level. The board is cleared and a new level appears with more new viruses.
  • You must submit a UML diagram with your solution to Lab 10. [If not submitted, you will lose 10 points]
  • Prepare a plain-text README file describing: [If not submitted, you will lose 10 points]
    • the testing of your code that you have done, and
    • all known bugs with your code. This is important - if we find bugs that you haven't listed, we will deduct extra points. If we find bugs you have listed, then we will not deduct additional points for those bugs.

Extensions (102 points extra credit described so far - may be adding more!)

The following are possible extensions that you may choose to undertake. If you have an idea that is not on the list, send email to your instructor for approval of it as an extension and a point breakdown.

  • [10 points] Implement a slider that changes the number of initial viruses on the board at the beginning of the round. The user sets the slider and then starts the game. The correponding number of viruses on the slider is the initial number of viruses.
  • [10 points] Change the level of difficulty (i.e. the number of initial viruses on the screen) as the user progresses through levels.
  • [10 points] Implement "dead" pill segments, where one half of the pill segment will never leave the initial place it was dropped and will never disappear from the board.
  • [5 points] Keep score - as the player eliminates viruses from the screen, the points go up.
  • [5 points] Keep lives - the player has three lives before the game is declared to be over.
  • [10 points] Two-player option that alternates players after each player loses a life.
  • [20 points] Two-player option where both players are playing on the screen at the same time on two different boards.
  • [3 points] Add sounds to the game.
  • [7 points] Add better graphics to the game (ie - viruses that are animated as in the original game, pills that are rounded)
  • [4 points] Implement some sort of high score where you can enter a name and it shows the top few high scores. Note: does not have to maintain this information when the program is closed.
  • [6 points] Change the high score so that it saves the high scores to a file or the like. This way we can save the high scores even when the program is closed.
  • [4 points] Animate the dropping pill segments when the partner is remove from the board.
  • [4 points] Make it so that when there are 4 OR MORE things on the board that have the same color, they are all removed.
  • [4 points] Make it so that when there is a corner, with a 4-part horizontal and 4-part vertical sharing a common pill section, all 7 items are removed

Submission Directions

You must include in the project a README file, as indicated above. This file must be a plain text file. You can create a plain text file in Eclipse by right clicking on your project and selecting New -> Untitled Text File. Now select File->Save As. Navigate to the Lab10 package within your Lab10 project (you should see "Lab10/lab10" as the parent folder location). Name the file "README" and click OK.

After you are finished writing your code, confirm that your .java files and the README file are located in the Lab10 package in your Lab10 project. Once you are certain that you have the correct set of files in your project, export your solution as a jar file, just as you did in previous labs, but name your jar file Lab10.jar.

VERY IMPORTANT NOTE- If you decide to do work beyond the minimum requirements, you must do the following:

  • A submission with just your basic requirements, named Lab10.jar.
  • A separate submission with the extra work included, named Lab10Extra.jar.
    • The Lab10Extra.jar file must be able to be imported as an exisiting project entitled "Lab10Extra." This means that the project folder name must be "Lab10Extra" before you attempt to export.
    • In your Lab10Extra README file, you must include a list of the extra credit items you completed, as well as the testing and bug information for the extra credit items.

You must follow all directions about filenames exactly, otherwise your work will not be graded.

When you are ready to submit your work, use the electronic submission program that corresponds to your recitation.


Due Dates

Due 11:59:59pm on Friday December 8th for all C sections.

 

CSE 115 - Fall 2006 - Footer

 

 
Last modified: Thu Nov 9 17:40:34 2006