This is a project written by Cece che Tita, Gisele Nelson, Willow Gu, Josh Meier, Kendra Winhall, and Ryan Dunn in Spring 2024 for CS 347 (Advanced Software Design) at Carleton College in Northfield, MN.
Our team contract can be viewed here.
Shipping Hazards is an implementation of the popular game Battleship, in which players have a fleet of ships that are hidden from their opponent. Players attempt to sink all of their opponent's ships in order to win the game. In this implementation, users can play against various computer players with different difficulty levels.
- Clone the repository and navigate to it in the terminal
- Type: docker-compose up -d --build
- If this is your first time playing you will need to follow the POPULATING THE DATABASE section in the walkthrough
- Go to http://localhost:3000/ in your browser
If you encounter any issues, please follow our walkthrough.
- Various colors, sounds, pop-ups, and music add excitement to the game.
- Customizable ship colors, ship placement, and screen names encourage creativity and novelty.
- Three computer opponents, with different levels of difficulty, add variety to the game.
- Multiplayer games add the ability to play with friends.
- The ability to rejoin games in progress allows for flexible gameplay.
- Websockets facilitate real-time communication, ensuring that gameplay is engaging and fast-paced.
- Account creation and login capabilities allow users to save their account data and preferences.
- Users, players, boards, and games can be viewed and changed from the admin site.
- Players can view their stats and past games.
- The Frontend folder contains the code for the graphical user interface of our game.
- We use JavaScript, React, and CSS for our frontend.
- The ai_server folder contains Python code for the computer players.
- The battleship folder contains the code for the database and web server.
- We use Django for our web framework, Django Channels for our websockets, and PostgreSQL for our database.
- The game_logic folder contains Python code for the game logic.
- Each folder has a Dockerfile that assembles the image for a particular component of the app.
- docker-compose.yml defines and runs the services and volumes for the entire project.
- clean_database.json contains initial data for the database.
This is the login page.
This is the player stats page, note the customizable screen name and ship color.
Missed shots are denoted by white squares, successful hits are denoted by red squares, and sunk ships are denoted by gray squares. The blue square marks the square that the user's cursor is on.
This is the popup marking a successful hit.
This is the popup marking a sunk ship.