A retro-looking, simple battleship game. It is a Python terminal game. Made to look and feel like one those first games. The goal is to guess the location the battleship. The player has only 10 turns to do so. It is aimed at any specific audience. Any one can enjoy!
-
The grid
-
Welcome message
-
Error messages
The game is very easy to play. Requires very minimal controls. The player simply types numbers.
- The player starts the game with 10 turns or guess
- The game will first ask the player to guess the row, it only accepts inputs of 0-8, then it will ask the player to guess the column.
- If the player guesses the same combination a message will pop saying "You guessed that one already." and they will lose one turn
- The game ends when the player runs out of turns or when they guess correctly the location of the battleship and sink it.
- The player will have the option to play again, by typing 'yes' or 'no'.
I have manually tested the game and these are the following bugs I've encountered:
-
Guess_row infinity loop
-
'yes' or 'no' bug
Rough outline of the game: For the game, I wanted to go full-on old school. Just a simple grid with Xs and Os.
- The logic of the game was dumb down, make as simple as possible so it will be easier to build into as the project progessed. As shown in the flowchart:
The below steps were followed to deploy this project to Heroku:
- Go to Heroku and click "New" to create a new app.
- After choosing the app name and setting the region, press "Create app".
- Go to "Settings" and navigate to Config Vars. Add a Config Var with a key word of called PORT and a value of 8000.
- Still in the "Settings", navigate to Buildpacks and add buildpacks for Python and NodeJS. They have to be in order, Python first, then NodeJS.
- Go to "Deploy". Scroll down and set Deployment Method to GitHub. Once GitHub is chosen, find your repository and connect it to Heroku.
- Scroll down to Manual Deploy, make sure the "main" branch is selected and click "Deploy Branch".
- The deployed app can be found here.
- Xbox Games Bar was used to record the screen and then used clideo.com was used to crop and convert my video
- LucidChart was used to create the flow chart
- Obsidian
- It is an interesting productivity application. It is a Markdown-based system that incorporates tags, plugins, and back-links to create a compelling to use the system. Great tool for note-taking and planning out projects. Later you can export your notes as PDFs.
- Python was used to create the game.
- Code was inspired by this tutorial https://www.youtube.com/watch?v=tF1WRCrd_HQ&t=732s by Knowledge Mavens.