Ask questions about this at http://pbl.cc.gatech.edu/cs2390/1564.html
As another helpful link, check out the Museum Simulation code.
YOU MUST WORK IN TEAMS OF TWO TO FOUR ON THIS PROJECT!
The cost of not working on a team is 15 points.
I'll define the battlefield and one team. You define the other team.
You'll use the simulation package, and will be required to put up a user
interface where we can see the movement of troops and tanks, and get
summary information in text fields, controllable with buttons.
The game board looks like this:
The Computer team starts at A (1@1 on the board, horizontal@vertical).
Your team starts at B (8@8). The goal is to get at least one of your
team into the opposing team's camp. Team B can take advantage of knowing
Team A's strategy.
Each team starts out with five soldiers and three tanks (soldiers cannot
enter or leave tanks).
Moving and Navigation
- Anyone can move in any direction horizontally or vertically at any time.
- It takes one unit of time to leave the base.
- It takes a soldier a Uniform distribution of 1 to 5 time segments to cross grass. It takes a tank a Uniform distribution of 1 to 3 time segments to cross grass.
- It takes a Uniform distribution of 10 to 15 time segments to cross water. Tanks cannot cross water.
- It takes a Normal distribution of 10 with a standard deviation of 10 to cross hills. (Take absolute value of negative values.)
- It takes a Normal distribution of 5 with a standard deviation of 10 to cross swamp. (Take absolute value of negative values.)
- A cell can hold any number of pieces, and enemy pieces can cross the same cell without conflict.
Combat
- Anyone can fire weapons at any time in any of four (horizontal or
vertical) directions. Soldiers and tanks each have weapons.
- A hit target is removed from play. If there are multiple targets in
the same cell, only one can be hit by a single firing.
- Soldiers can fire only one cell away. They have a 1 out of three
chance of hitting their target when it is one cell away, and a 1 out of
two (50%) chance of hitting the target within the same cell.
- Tanks can fire up to two cells away (choice of one or two). They
have a one out of five chance of hitting a soldier. They have a one out
of three chance of hitting a tank.
- Only tanks can hit a tank. Tanks are not targets for soldiers.
Tanks can hit soldiers.
- It takes everyone 1 time segment to reload a weapon. A piece cannot
move while reloading. A piece must reload after firing.
Team A's Strategy
- Team A leaves one tank at Cell 1@1 to defend the base.
Whenever an enemy comes within range, it fires.
- Team A moves one soldier to 1@2 and one to 2@1, and also leaves them
there to defend the base. Whenever an enemy comes with range, these
soldiers fire (both of them).
- The remaining tanks and soldiers split into two squads. Two soldiers
and a tank move horizontally across the top, then vertically down the right
side to reach the base. The other soldier and a tank move vertically down
the left side, then across the bottom to reach the base.
- The squad that moves across the top first moves as a group. All pieces
move to the next cell, and no cell moves on until all the squad pieces have
reached that cell. This squad never fires until it is within three cells of
the enemy base. Then each piece alternates firing with moving, and only fires
at enemy targets along its route to the enemy base. If there are multiple
targets, they randomly choose (tank or soldier).
- The squad that moves down first moves as individual pieces. As quickly
as possible, the pieces move along their route. This group never fires at all.
User Interface
- I want to see icons for where all troops are during play.
- At the end of play, I want to be able to click on any cell to see what's in that cell. I also want to know how many weapons were fired by each of the participants in that cell.
- At the end of play, announce who won and how many time steps (NEEDED FOR EXTRA CREDIT DETERMINATION!).
- At the end of play, if I click in a team encampment cell, I want to see statistics on that team: How many weapons fired, how many hit, whether or not the team won.
- At the end of play, I want a "Paths" button somewhere that I can click on to see all of the paths of all of the participants drawn on the gameboard.
- There must be a "Quit" button that ends the user interface and returns control to the user.
- Assume a 400 by 400 screen space.
Scenarios
- How does your team's strategy take advantage of knowing Team A's strategy?
- What happens when your tank fires a weapon? How does a target find out that it has been hit?
- What happens when the user clicks the "Paths" button?
- What happens when the user clicks on a cell after the simulation has ended?
Running the Code
We will start your code by executing WarGame begin.
You will then execute your simulation until either one or the other team
wins, or a stalemate is reached (e.g., all players are dead except those
that won't move).
Extra Credit
- 5 points extra credit in each section that wins over Team A in the
smallest number of time steps.
- 5 points extra credit if another team uses your UI structure.
(Other team must reference the credited team by name in
writeup!) (NOTE: Can't work both ways! If Team 1 uses Team 2's
structure, Team 2 can't also use and credit Team 1's structure.)
Hints, Issues, Suggestions
- Grading will be based on Grading Policy page.
- Please follow Design Documentation
standards.
- Discuss at A3
Collaboration Space.
- Due on October 13 in class. Each team member submits the team code via
email to your TA. Since this is a team effort, you can choose which TA's
section you wish to turn this in to. Please bring your written documentation
(one set per team) to class on October 13.
Grading Breakdown
50 points for the design doc -
- 10 points for good CRC - Makes sense, is detailed
- 10 points for good overall quality - Has more than one class in it,
follows rules in Criteria for Good
OOA/OOD (eg, no class name is a verb)
- 10 points for reasonable detail in OOA/OOD - you can code from it
- 10 points for the diagram - Correct in notation, doesn't break any
semantic rules (e.g., subclass = is-a)
- 5 points for scenarios
- 5 points for reuse
50 points for code -
- 10 points - Getting a UI to display on the screen
- 10 points - Getting the teams to display
- 10 points - Having the teams move during game play
- 10 points - Displaying statistics data
- 10 points - Having the buttons on screen, and functional