The battleship game is a traditional battleship game where a player is able to face an AI opponent. Basically a fun game perfect for passing time.
In the beggining of the game the rules are presented.
A player is able to choose what their admirals name is.
Announcements surrounding the game are put forth before and after each shot during the game.
- It notifys the player if the shot was a hit or a miss.
- if a ship was destroyed.
- If you lost or won.
The board stores hits and misses.
The opponent is a AI.
- The AI shots at the board at random.
- The AI shots 3 secounds after the human players turn, it's not a necessity but it's there to try to resemble how a human plays the game.
-
Enable placement of ships in fleet by the player. As of now only the admin can change the positions of the ships, unfortunatly this means that the player will likely realise that the fleet is positioned the same way after a couple of games.
-
Developing a AI opponent which is more effecient than simply putting out random coordinates on the game board.
-
If previousley used coordinates are put forth again the game should notify the player and enable them to choose new coordinates instead of continuing.
Went through Python Syntax Checker PEP8 without issues.
-
The game has no way of knowing if the coordinates have been used before or not.
-
If a player writes down the coordinates before the AI has attacked the player might get confused since the input seems to be needed to be put forth again. If it is the player has to put forth the coordinates again. Can be avoided through removing the time module. Will keep for more realistic user experience.
Deployment on Heroku.
- After login click New button in the right top corner.
- Chose app-name and region.
- Choose settings in the bar.
- Click reveal Config Vars and add Key Port and the Value 8000.
- Add the buildpack heroku/python and heroku/nodejs in this order.
- Click on Deploy in the bar.
- Click on connect on github in the Deployment method section.
- Click search in the connect to GitHUb section and choose the relevant github repository.
- Click on Automatic deploys or manual deploy depending on preference. Manual deploy was chosen for this project.
Here is a link to the finished game Battleship Game.
The code for the battleship game was in part acquired through a tutorial series on Youtube, Youtube, Youtube, Youtube, Youtube, Youtube, Youtube.
Code Institute for providing excellent course material and tutoring.