Battle ship requirements



Jonathan Chan

Tyler Kapp

Introduction

The final project will involve the implementation of a two person battleship game. It will use the microprocessor that we built on the DE1 board. Each team will send commands to the other team’s board.

Inputs

Typed commands in the Eclipse window. Where to place ships at the beginning of the game. Each turn the user will have to specify what type of weapon is to be used and where it should hit.

Outputs

The eclipse window displays outputs. Whether an object was hit, missed, and or sunk. It also tells the user if the location was already shot at. Display will state whose turn it currently is, and who wins at the end of the game.

Battleship requirements

1. Board size

a. 10 x 10 grid

2. Rules

a. Both teams place ships at the start of a game.

b. Each team gets one turn

i. Choose weapon

ii. Choose location to be shot at

iii. End of turn

c. The game ends when all of one teams ships have been sunk.

3. Ships

a. One Aircraft Carrier – 5 spaces long

b. One Battleship – 4 spaces long

c. One Destroyer – 3 spaces long

d. One Submarine – 3 spaces long

e. One Patrol boat – 2 spaces long

f. One “Special boat” – between 3 and 6 spaces long

4. Weapons

a. Torpedoes – only when Submarine is in play

i. Take out a 1 x 2 line

ii. If it hits a Destroyer, the destroyer is destroyed.

b. Bombs – only when Aircraft carrier is in play

i. Planes drop the bombs

ii. Take out a 2 x 2 part of the grid

c. Shells – only when Battleship is in play

i. Destroys a 1 x 2 rectangle

d. Depth charge – only when Destroyer is in play

i. Destroys a 1 x 1 square

ii. If it hits a submarine, the submarine is destroyed.

e. Machine gun – only when Patrol boat is in play

i. Destroys a 1 x 1 square

f. Special weapon – only when special boat is in play

i. For ship length 3 it destroys a 1 x 4 rectangle

ii. For ship length 4 it destroys a 1 x 3 rectangle

iii. For ship length 5 it destroys a 1 x 2 rectangle

iv. For ship length 6 it destroys a 1 x 1 rectangle

Note: We would prefer that there be no “special boat” being that we gave some of the other ships special weapons.

Cautions and Warnings

In order to get into the Battleship mind set you should be weary of water that is not bottled because it may contain salt. Instead you should drink beer or rum; it’s a much safer bet. Before you consume any alcohol be sure to locate the floatation devices aboard your vessel. Since none of the ships move in Battleship you can get as drunk as you want. Your swaying will offset the swaying of the boat and as a result you will not get sea sick. This was derived by the fact that you swaying is like a sine wave and the boat’s swaying is like a sine wave with a 180 degree offset. Of course for this to work you will have to make sure that your swaying is in fact 180 degrees off from the boat’s. Be cautious of playing this game for too long, as it can result in the use of nautical terminology in every day life.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download