Name | NetID | Section |
---|---|---|
Nathan Chiang | chc10 | ECE 120 |
Charles Cardenas | cmc13 | ECE 120 |
Jaden Li | sizhel2 | ECE 120 |
Statement of Purpose
The goal of this project is to digitize a simplified version of the classic board game, Battleship. Instead of the traditional 8x8 board, this project will revolve around a 4x4 board that follows a simplified version of the traditional game mechanics.
Background Research
This project was inspired by a similar project that was built in a previous semester of Honors Lab: tic-tac-toe. Following a similar design of using buttons, LEDs, and an Arduino, we hope to create a working version of Battleship that would allow the user to face a computer. However, more differently, our battleship project contains rules and conditions that are significantly different than those of tic-tac-toe. We hope to lean more into the software integration aspect of this project and discover how software can be used in conjunction with hardware to modernize such a classic board game.
Block Diagram / Flow Chart
System Overview
The game starts with the initialization of the Arduino Mega. Before any player input, the software initializes both boards, prepares all of the CPU's guesses, and determines which player goes first. Afterward, the player places all of his or her ships before the play loop begins. Within the loop, the player chooses a place to attack, and that attack is checked to see if it has been chosen previously. If it is not a valid turn, the player would have to submit an input again until it is a valid turn. After this, the turn is checked to see if it has hit anything, and if it was a hit, the player gets another turn. However, if the player has not hit anything, there is a player change and the next person gets to go. Finally, the loop keeps going until win conditions are true (i.e. all of the opponent's battleships have been destroyed), and that is when either a lose or win board is displayed before resetting the game.
Parts
Part | Quantity | Model Number | Purpose | Vendor | Price |
---|---|---|---|---|---|
Arduino Mega | 1 | Manage all the inputs and outputs to create a functioning game | Honors Lab Inventory | $39.95 | |
RGB LED Matrix Panel | 1 | To display the entire battleship board | SparkFun | $44.95 | |
5V/2A Power Supply | 1 | To power the LED Matrix Panel | SparkFun | $19.50 | |
Breadboard | 1 | A place for the buttons to sit on | Honors Lab Inventory | ||
Buttons | 16 | For player input/decisions | Honors Lab Inventory |
Total Price: $104.40
Possible Challenges
The development of this project will be pretty coding intensive, so the primary challenge of this project is whether our group will be able to write a program that is working and free of bugs within the given time frame. Additionally, there is an issue regarding memory as the number of outputs needed for this project exceeds the number of I/O available to use through the Arduino Mega.
References
Attachments:
Screen Shot 2022-02-20 at 3.00.09 PM.png (image/png)