EE 399 Lab 1
EE 399 Lab 5 Requirements
University of Washington – Department of Electrical Engineering
Lab Section: AA
Jonathan Feucht
Eugene Jee
Chanvichet Eng
Table of Contents
Inputs 2
Outputs 2
Common Features 2
Board (battle field) size 2
Ship sizes 2
Rules of Play 2
Money System 2
Commands 3
Starting the Battle 3
During the Battle 3
Pirates 3
Winning Terms 3
Baud Rate 3
Word Size 3
Parity 3
Major Functions 4
Setup 4
Synchronization 4
Originality 4
References 4
Abstract
The requirements for the fifth lab that involve designing and implementing the classic game, Battleship, is proposed in this document.
Introduction
Working with Altera DE1 Development and Education board’s Nios II chip and library, reconstructing the classical game Battleship is intended to be reconstructed. Our goal is to develop the game in a way that is capable of networking with another team’s Altera DE1 board. Due to foreseeing of compatibility issues, if earlier proposals from each developing team are not shared, this extra document is presented. Our team’s suggestions of general requirements for the game setup will be discussed.
Inputs
Data of the 2 players’ choices from 2 PCs will be brought to our DE1 board throughout a battle match. See the Setup section for hardware connection details.
Outputs
The game console on our DE1 board will inform the two PCs of the consequences of the choices made by the players and ask for choices. Data for the battle field information along with available choices will be sent out.
Common Features
Board (battle field) size
• 10-by-10 grid
Ship sizes
• 5-by-1: Aircraft Carrier
• 4-by-1: Battleship
• 3-by-1: Destroyer, Submarine
• 2-by-1: Patrol Boat
• 1-by-1: Stealth Boat
Rules of Play
Money System
For the sake of fairness in the fire power of each player and intensity of brain usage, a money system is needed. Each player will be given 25 credits before engaging in a battle. A ship costs 1 credit for each of its block size. A round of firing also costs 1 credit. Therefore, enough credit is provided initially to buy each type of ship and ammunition good for a minimum for a ten round period. Players need to spend at least 20 credits before the battle.
Commands
Commands will involve picking an integer value that is specified by the game console.
Starting the Battle
A battle is a life or death situation and luck is involved. The system will pick a random point on the battle field, or the board, and the player who picks the closest block to the picked point will be granted with the initial turn to start the fire. In case of a equal distance block picked by both players, the luck competition will be repeated.
During the Battle
Each player will take turn in shooting each other. Within one turn, a player is able to shoot at any spot on the board once and move to its adjacent spot once. When successful in hitting one of opponent’s ships, the player will be granted 1 credit. In the case of moving a ship, overlapping an opponent’s ship will be equivalent to shooting and successfully hitting the opponent. Moving a ship will cost 3 credits for each block of mobility.
Pirates
Pirates are annoying and dangerous at the same time. During each turn a random point will be chosen and the spot will be destroyed by the pirates. Spot chosen will be displayed to both players; however, information of whether an opponent’s ship was hit or not will not be provided.
Winning Terms
The player who gets all the ships eliminated by the opposing player shall resign from the game and take the fact that the game is over.
Baud Rate
Since the default rate for the serial UART setup within Altera Quartus SOPC environment is baud rate is 9600 Bd, this rate should be taken. 9600 symbols per seconds is fast and it is a known rate without errors[1].
Word Size
Highest decimal value for the ASCII is 127 and an 8-bit word size of will fit any character within the whole ASCII table and room for a stop bit.
Parity
Following information is taken from Wikipedia[2]:
In serial data transmission, a common format is 7 data bit, an even parity bit, and one or two stop bits. This format neatly accommodates all the 7-bit ASCII characters in a convenient 8-bit byte.
We suggest the validation and usage of the information.
Major Functions
Setup
As mentioned in the Inputs section, each Altera DE1 board will be connected to two PCs; through USB connection to its owner’s PC and through UART to its opponent’s PC. This is illustrated in Figure 1.
[pic]
Figure 1: Setup
Synchronization
Syncing of data from the game should be made through the hardware connection mentioned in the above Setup section. In addition, this process should be done after each turn of play during a match so that a flawless match is performed every time.
Originality
A few features such as displaying of the battle field and mobility of the ships for the same cost of mobilizing ships need to be redefined within the working boundary of common features.
References
Unknown multiple authors. Asynchronous serial communication. May 15, 2009. Wikipedia. May 18, 2009
Unknown multiple authors. Parity bit. May 4, 2009. Wikipedia. May 18, 2009
Unknown multiple authors. Universal asynchronous receiver/transmitter. May 1, 2009. Wikipedia. May 17, 2009
-----------------------
[1] Due to the nature of the information source, this information may not be valid and cannot be fully trusted.
[2] Due to the nature of the information source, this information may not be valid and cannot be fully trusted.
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- local 399 license renewal
- escience lab 1 answers
- dental implants 399 00
- 1 200 dilution lab chart
- 399 tooth implant price list
- a p 1 lab final exam
- maaco 399 paint special
- lab exercise and homeostasis lab report
- 1 or 2 374 374 1 0 0 0 1 168 1 1 default username and password
- 1 or 3 374 374 1 0 0 0 1 168 1 1 default username and password
- 1 or 2 711 711 1 0 0 0 1 168 1 1 default username and password
- 1 or 3 711 711 1 0 0 0 1 168 1 1 default username and password