Giter VIP home page Giter VIP logo

battleship-3's Introduction

Battelships Project

Battleships is a terminal game that runs on Heroku. The object of the game is to beat the computer at the game before it beats you

Battleship

https://battleship-a.herokuapp.com/

Features

This battleship game allows the user to sink the battleship with 4 turns before it's game over. Its a simplified version of the game. The main features of the game are.

  • A welcome message with the a brief message and a description of the game

  • There is a feature which you can enter your name and a prompt which greets the player

  • If you hit a ship a prompt with the message "You've hit a battlship!" appears on the screen.

  • If you miss the co-ordinates by a wide margin, the message "Missed by miles that's not even close" appears.

  • If you take a shot that has already been taken the message "You guessed that already" appears

  • Your misses are marked by an "X" with the following messsage "You've missed"

  • After 4 consecutive misses you need to play a new game, the termnal prompts the message "Game over"

Technology employed

• Gitpod to run the project on as an IDE

• Heroku to run the project on an external terminal

• W3 Schools to learn more about Python and indentation and functions

• PEP8 online checker to check my results and to see if my Python Code was formatted correctly

Bugs

Initially , I found it difficult to indent some of my code when passing it through the PEP8 online checker, I had to rely on Tutor support to talk me through this issue , it was easlily rectified in the end. WELCOME = str(input('Welcome to Battleship!!' 'The object of the game is to sink the computers ships')) My indentation initially was out of place with the second line of code place to the left.

  • print(*b) I found that this print command was easier to implement rather than by using join method which I found I would not work. I tried to print " " .join board which gave an error, print(*b) however worked.

I also found it difficult to implement a character representing a hit, I initially tried to implement the "&" symbol but found I couldn't, however with more practice.

Remaining Bugs

No bugs remaining.

Validator Testing

PEP8. No errors were returned.

Deployment

This project was deployed on Code Institute's mock Heroku terminal

The site was also deployed to GitHub pages. The steps to deploy are as follows: In the GitHub repository, navigate to the Settings tab From the source section drop-down menu, select the Master Branch Once the master branch has been selected, the page will be automatically refreshed My project will not run efficiently on Heroku m, although it works well on Gitpod . I will need to rectify this proble when I repeat the project.

Credits

I'd like to thank the Code Institiute Tutoring team for many of their tips when implementing this project . I found their instruction be extremely helpful.

Media Credits

I found the following sources of help when trying to implement my project.

battleship-3's People

Contributors

stevieinwaterford avatar

Watchers

 avatar

Forkers

thesherifff

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.