Giter VIP home page Giter VIP logo

battleship-6's Introduction

Battleship Game

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.

Features

Rules

In the beggining of the game the rules are presented.

Username

A player is able to choose what their admirals name is.

Announcements

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.

Storing hits and misses

The board stores hits and misses.

AI opponent

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.

Future features

  • 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.

Testing

Python

Went through Python Syntax Checker PEP8 without issues.

Unfixed Bugs

  • 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

Deployment on Heroku.

  1. After login click New button in the right top corner.
  2. Chose app-name and region.
  3. Choose settings in the bar.
  4. Click reveal Config Vars and add Key Port and the Value 8000.
  5. Add the buildpack heroku/python and heroku/nodejs in this order.
  6. Click on Deploy in the bar.
  7. Click on connect on github in the Deployment method section.
  8. Click search in the connect to GitHUb section and choose the relevant github repository.
  9. 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.

Credits

The code for the battleship game was in part acquired through a tutorial series on Youtube, Youtube, Youtube, Youtube, Youtube, Youtube, Youtube.

Acknowledgements

Code Institute for providing excellent course material and tutoring.

battleship-6's People

Contributors

carlssonoscar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.