ECE497 Project BattleShip

Team members: Dustin D. Kline, Douglas T. Wise, Sara C. Harvey-Browne

Grading Template
0 = Missing, 5=OK, 10=Wow!

 00 Executive Summary 00 Installation Instructions 00 User Instructions 00 Highlights 00 Theory of Operation 00 Work Breakdown 00 Future Work 00 Conclusions 00 Demo 00 Late Comments: I'm looking forward to seeing this.

Score: 10/100

(Inline Comment)

Executive Summary
The purpose of this project is to establish a wireless connection between two BeagleBones that will run a game of BattleShip. We will be using pygame to "play" the game and use rotary encoders or push buttons through the BeagleBone ports. The encoders or buttons will allow the user to move their location on the board to first place ships in the directions of up, down, left, and right, and then move their location to shoot ships of their opponent.

Status of Functioning Portions: Overall gameplay of Battleship is fully working. Upon starting the game, the player places their ships, they are not allowed to overlap ships or wrap around the board. players take turns taking shots. Yellow indicates a miss, and red indicates a hit. the player is shown the opponent's move prior to taking their own. Once the game is over, the winner is notified and both players are asked if they would like to continue. 'yes', starts a new game, 'no', quits the game.

Status of Non-Functioning Portions: GPIO button functionality is being worked on.

End with a two sentence conclusion.

The sentence count is approximate and only to give an idea of the expected length.

Packaging
If you have hardware, consider Small Build, Big Execuition for ideas on the final packaging.

Installation Instructions
Give step by step instructions on how to install your project.


 * Include your github path as a link like this to the read-only git site: https://github.com/MarkAYoder/gitLearn.
 * Be sure your README.md is includes an up-to-date and clear description of your project so that someone who comes across you git repository can quickly learn what you did and how they can reproduce it.
 * Include any additional packages installed via apt.
 * If there is extra hardware needed, include links to where it can be obtained.


 * Github Path: https://github.com/klinedd/BattleShip
 * Additional Packages: simplejson, pygame
 * Extra Hardware: push buttons

User Instructions
This game can be played either on a computer or the BeagleBone Blue. Internet connection needs to be established before running the game. Unless the user wants to play on a single device. The game is started from the terminal. Upon starting the game, the user is prompted to be either 'player 1' or 'player 2'. player 1 acts as the server and sets up a socket in python. player 2 needs the IP address of the server(player 1) in order to connect, or localhost if it's being played on a single device.

there are three boards that the game keeps track of
 * Board: where the user places their ships
 * play_board: the board that displays during gameplay, and shows the users turn actions
 * opponent_board: the user doesn't see this board, it is updated with the play_board and is sent to the opponent to update their Board

Computer Controls:
 * Arrow keys move the cursor
 * Return places ships, shoots, and Continues the game
 * when placing ships, the arrow keys also pick ship placement direction

once the connection is established, both players may place their ships. once finished, player 1 sends their board to player 2 over the socket using simplejson, followed by player 2 sending their board.

once both players have each other's boards. player 1 gets the first turn. player 1's play board, and the opponent board is updated and the opponent's board is sent over the connection. the opponent(player 2) can then see what player 1's first move is. player 2 continues, and is then allowed to take their turn.

the game keeps track of the number of hits the player gets. once the hit count(hitCount) reaches 17(number of hits it takes to sink all ships) the winner is notified.

both players are then asked if they would like to continue through a terminal prompt. 'yes' starts a new game, 'no' quits the game.

Highlights
Here is where you brag about what your project can do.

Include a YouTube demo.

Theory of Operation
This game can be played either on a computer or the BeagleBone Blue. Internet connection needs to be established before running the game. Unless the user wants to play on a single device. The game is started from the terminal. Upon starting the game, the user is prompted to be either 'player 1' or 'player 2'. player 1 acts as the server and sets up a socket in python. player 2 needs the IP address of the server(player 1) in order to connect, or localhost if it's being played on a single device.

Both player one and player 2, handle gameplay actions. the connection is used to update each player of the other's move.

pygame events are used to track user actions

Work Breakdown
List the major tasks in your project and who did what.

Also list here what doesn't work yet and when you think it will be finished and who is finishing it.

Douglas:
 * Networking the game
 * client-server code
 * 2 player functionality
 * screen drawing/updating(player moves)
 * ship placement
 * gameplay
 * win checks
 * post game restart/quit

Future Work
Suggest addition things that could be done with this project.

Conclusions
Give some concluding thoughts about the project. Suggest some future additions that could make it even more interesting.