-
Intro Screen & Leaderboards
-
Grid, updating stats, successfully hit (easy board)
-
End screen with stats, with hits and misses on the grid (medium board)
-
Exit, scoring / stats, leaderboards - all ships sunk (easy board)
-
All ships sunk, end screen with stats, with hits and misses on the grid (hard board)
-
Hard board
Inspiration
Our project was inspired by the classic game of Battleship, which combines strategy, logic, and memory. We wanted to explore how different cognitive approaches affect gameplay and decision-making. By developing an algorithmic version of Battleship, we aim to uncover insights into strategic thinking and problem-solving by including multiple features that can increase or decrease the game's complexity.
What it does
This algorithmic-based game presents an algorithmic version of varying difficulties and features of the game Battleship, which provides insight into how people approach strategy and cognitive thinking. The program utilizes a MongoDB framework, Spring frameworks, and Java classes to set up a 1-player version of Battleship. By playing the game, the game tests the player's memory, strategy skills, and cognitive processing abilities due to the random placing and varying difficulties. This allows the player to strengthen these three things and can strengthen the brain's neural processing.
How we built it
We built the entire program using Java. We set up two types of classes, generally: a Battleship class (which was then expanded into varying levels of difficulty) and a GameSetup class. These two classes are the crux of the program — allowing the user to play the game as seen in the console and for all the background logic to work. We set up a MongoDB database to store a leaderboard that did not change between program executions. This is supported by the Database.java program. On the front end, we utilized the Spring / SpringBoot framework to set up a Java web app with the help of Mongo DB. However, we could not integrate the front-end and back-end programs due to Java version compatibility.
Challenges we ran into
The largest challenge was integrating the Spring framework into the Java program. While we weren’t able to fully resolve the Spring framework issue, we were able to learn more about the setup and the processes needed. As a result, we were also able to learn more about Java version compatibility and how that can affect different working parts of our game.
Another challenge was utilizing MongoDB to create a leaderboard database that saved between different program executions. With MongoDB, we had to learn how to integrate it into Java and set it up so that any IP could access the database while running the program.
Accomplishments that we're proud of
Shivani: I was proud to learn significantly about Game Design and setting up the main functions for the GameSetup class.
Iven: Having a saved leaderboard that doesn't reset between program execution, and filtering it based on our difficulty levels.
Manu: Learning a new framework (Spring) to set up a web app.
Jaycie: Being able to run TomCat on .jsp files.
What we learned
Shivani: I learned significantly about Game Design and how it can be integrated with Java programs.
Iven: I learned a lot about MongoDB and how to integrate it with our Java program from scratch.
Manu: Learning how to use the Spring framework for the Java Web App.
Jaycie: Learning about different methods of front-end and back-end interactions in Java.
What's Next for Battleship: An Algorithm that Maps the Mind
We first hope to fully integrate the Spring Framework to set up the program as a web app. While the current framework runs, we are unable to see the website, so we hope to integrate it further with HTML & CSS files. This will allow users to have easier access to the program and can help with the user experience and the smoothness of the program.
More generally, in the future, we hope to add more features to the game that can help develop the complexity, thus providing more ways to strengthen the way one’s mind works with strategy, memory, and cognitive processing.
Such features include a two-player mode, where both players attack the same board, one at a time, to rack up the most points; a "limited shots option", giving users an option to only take a certain number of shots throughout the game; and providing more options for grid sizes and shapes, including irregular shapes.

Log in or sign up for Devpost to join the conversation.