Git Product home page Git Product logo

conundrum's Introduction

Conundrum

  • This is the third milestone project for the Full-Stack software development course through Code Institute. I named my project Conundrum as that's exactly what the user will have to go through. The requirement for this project was to create a quiz game that would ask questions to the user. If the answer to the question is correct then the user would be directed to the next question. If the answer to the question is incorrect, then that incorrect answer would be displayed for the user to see. The user then would be able to have another shot at guessing the answer. After all the questions are answered, the user is directed to a leaderboard page with all the top scores.

  • Heroku app

  • GitHub Repository

Table of Contents

  1. UX
  2. Technologies, Libraries and Languages
  3. Testing
  4. Deployment
  5. Running the code locally
  6. Credits

UX

Strategy

  • Design an app for those interested in solving logic based riddles.
  • As a user I would expect to be asked a question. If I answered correctly, I would receive some form of points and move onto the next question. If I answer incorrectly, I would expect to see no points and be able to try and guess the answer again. If I couldn't guess the answer I'd expect to be able to skip to the next question. To see how my score compares to everyone else, a leaderboard should show those results.

Scope

features

Header and Footer
  • A navigation bar with two links. One that redirects to the index page and the other that redirects to the leaderboard.
  • A page icon that redirects to the index page.
  • A GitHub icon that opens a new page to my GitHub repository.
index
  • A login page where a visitor can create a username in the input field.
Question page.
  • A welcome message is displayed greeting the user by their name.
  • There is a section where the questions are displayed.
  • The user has a input field to enter their answer or a button to skip to the next question.
  • When the user answers incorrectly, their answer will be displayed in the incorrect guesses section.
  • There is a bar that displays the users current score, remaining amount of guesses and a button that when clicked, displays the games rules and scoring.
  • If the users remaining guesses reaches 0 than the question will be skipped to the next question.
leaderboard page
  • Once the user has been through all of the questions, the page gets redirected to the leaderboard.
  • This will show the users final score and a different message will display if they got on the leaderboard or not.
  • A table shows the top ten scores and the name of the user that obtained that score.

Wire Frames

Technologies, Libraries and Languages

Python

Was used to:

Jquery

Was used to:

  • Hide the welcome message in conundrum.html.
  • Toggle to show and hide the game rules in conundrum.html.
  • https://jquery.com/
BootStrap

Was used to:

Flask
HTML 5

Was used to:

  • position and format the html elements.
CSS 3

Was used to:

  • Style the HTML elements.
Font Awesome

Was used for:

Google Font

Was used for:

Testing

Automated Testing

The automated test involves:

  • If the project is ran locally, to run the tests enter python test.py and python -m unittest
  • Click here to see my automated tests

Manual Testing

To see the manual test file click here.

Code validation

CSS

  • Using the jigsaw validator, the main.css file passed with no errors.

HTML 5

  • Using W3C validator, the files returned no html5 related errors. Flask related errors were returned which is expected.

Python

  • There are no errors.

Deployment

In heroku

  • Created a new app called conundrum

  • In the terminal command line entered:

    • heroku login Entered username and password.
    • git init to Intilised a git repository.
    • git remote add heroku https://conundrum.herokuapp.com/ to link the GitHub repository to the Heroku app.
    • pip3 freeze --local > requirements.txt Creates a .txt file which tells Heroku what dependencies the project is using.
    • echo web: python run.py >procfile Tells Heroku that this project is a web app and that "run.py" is going the run it.
    • ps:scale web=1
    • git add
    • git commit -m "message"
    • git push -u heroku master
  • In heroku

    • Go to the project > setting > config vars
      • IP | 0.0.0.0
      • PORT | 8080
      • SECRET_KEY | <your secret key>
    • More > restart all dynos
  • The project can be found at: https://conundrum.herokuapp.com/

Running the code locally

  • In the terminal command line enter:

    • git clone https://github.com/brettcutt/conundrum.git
    • sudo pip3 install flask
  • Create a env.py file:

    • Inside type:
      • import os
      • os.environ.setdefault('SECRET_KEY', '< your secrect key >')
  • In the terminal command line enter:

    • python3 run.py

Credits

Content

Code

Media

Acknowledgements

  • My mentor Mossa Hassan

    • Showing me more ways of debugging and watching responses.
    • Recommending sites to research
    • httpstatuses.com
  • The Code Institute slack forum

    • Reading about other student questions, answers and problems greatly helps.
    • Good constructive criticism about the scoring from students Jo Wings and Eventyret.

conundrum's People

Contributors

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