Final Project: Fall 2023
Learning Objective(s)
- Use all (or almost) all that you have learned this semester.
Overview of the Program
Create a system that will allow the user to play a two-person game using worms. The worms can move around. When one move touches another worm, the second worm is destroyed and the player associated with the first worm wins. An advanced version of the game allows the worm to grow or shrink in size depending on hitting "hidden" squares.
Specifics
- This program is to be GUI based.
- It should use a key listener
- The board is 30 X 30
- A specialized board will have hidden +'s and -'s randomly placed on the board (at most 10).
- If a worm moves on top of a +, it grows (on the back end).
- If it moves on top of a -, it loses a segment on its front end.
- Once a - or + is encountered, it is removed from the board.
- Worm details
- Each initial worm is 5 segments long and has a color (that is used to display it)
- The head of the first worm (red) is in the upper left hand corner with its segments along the top row. It moves with an a, s, d, or f (left, down, up, right, respectively)
- The head of the second room (black) is in the lower right hand corner with its segments along the bottom row. It moves with an h, j, k, or l (left down, up, right, respectively)
- If a worm contacts itself, by default it is not a problem.
- The game can be played with specialized worms that if a worm touches itself, it dies.
- The program must use a linked list
- The program must use inheritance
- The program must have menu to restart the game
- The name of the game is Catch
* Submission details
- The design (UML and testing plan) should be done before starting to code. You may get feedback on your design and/or testing plan if you wish (once), but there will only be one submission for this lab.
- create a zip folder containing only the following (and submit it)
- only one file (as a pdf) with the completed software development report
- all the .java files needed to run the program
- any input files you might want to have the grader use when running the program
Optional improvements
Use concurrency to ensure that only one person can move at a time. This is a major challenge because I am not sure if keyboards can have two characters pressed at the same time. It might be that the system needs to have given moments when it looks for one player verses another. Or maybe two different threads looking to read the keyboard at the same time (and once one locks it, it suspends it for a little time). This is something you will need to work on yourself.