Giter Club home page Giter Club logo

the-gem-in-the-tower's Introduction

Purpose of the project

banner

  • The Gem in the Tower is an old school adventure text base. It will be used to practice python and apply OOP principles
  • The purpose of the game is to ascend the tower and reclaim the Gem from the final enemy.

User stories

Flow Diagrams

First milestone.

  • This diagram shows the basic skeleton of the program and the minimum objectives that the project should deliver. This is a functional yet basic game. FirstMilestone

Complete Flow Diagram

  • The complete diagram below displays the final flow of the game. Uses the skeleton in the first milestone but expands it allowing the player to take actions and randomly triggering encounters depending on the user's input.
  • The descriptions for each floor are decoupled and store those descriptions in a functions.py file to allow modifying or expanding without impacting the core functionalities. Final_Diagram

Features

  • Playing a game.
  • Select the action while fighting.
  • Select the action after a fight happens.
  • Choose between continuing or exploring for a chance of getting a reward.
  • Complete the game by defeating the final boss.

Future features

  • Introduce different type of floors and descriptions. This will achieve by creating a floor class.
  • Introduce different type of monsters. This will be done by creating a subclass of the player class.

Technology

  • Python
    • The programming language for this exercise is Python.
  • Heroku
    • Heroku is the platform used to deploy the program and make it accessible to the general public
  • Github
    • Github was selected as the version control
  • Lucichart
    • Lucichart was used to design the flow diagrams.

Test cases

  • User starts a game.
  • User visit local host or Heroku app link
    • Expected behaviour: The user will be presented with the game banner.
      • Passed: Upon loading the game displays the game banner with the correct colour style gamebanner
    • Expected behaviour: The game will load and the user will be able to enter a name. Validation will ensure only letters are used in the name.
      • Passed: The user is able to select the name. Validation ensures only characters ares used in the name. namevalidation namecorrect
  • Users select what do during a fight.
    • Expected behaviour: A user can select Attack, Defend or Heal during an encounter (1, 2, 3)
      • Passed: User is able to see the combat menu
        combatstart
    • Expected behaviour: The user will see the result of the action, an incorrect entry will trigger a message stating that the entry is incorrect.
      • Passed: Input validation
        combatvalidation
      • Passed: Action one is recognised and the program display the attack roll outputting if success or not combatoption1
      • Passed: Action two is recognised and the program display the correct description
        combatoption2
      • Passed: Action three is recognised by the program and additional validation is done to check if the health points are currently at maximum combatoption3
  • User can choose to explore for a chance of getting a reward
    • Expected behaviour: A user can select one or two in order to continue or risk an encounter to gain a reward.
      • Passed: Validation is successful, only 1 or 2 are valid options. flooractionvalidation
      • Passed: After selecting the option to continue searching an encounter is triggered flooractionvalidation2
  • User selects what happen after a fight
    • Expected behaviout: After a fight the user can continue or recover their health point (1, 2). Recovering the health points have a 40% chance of trigger an encounter.
      • Pass: The after fight menu appears after the fight ends and the player have over 0 Health Points aftercombatmenu
      • Pass: After input 1 the program continues to the next scene aftercombatmenu1
      • Pass: After input 2 the program display the text for heal and if no encounter is trigger it will continue the program aftercombatmenu2
  • User complete the game defeating the final boss
    • Expected behaviour: After bringing the last boss's health points to zero the user will complete the game seeing the last description.
      • Pass: After bringing the final boss to zero health points the game displays the game ending text endingtext
  • The game end when the user Health Points reach zero
    • If at any point the player's Health Point reach zero the game end immediately displaying the game over message.
      • Passed: When the player reaches zero health points the game ends displaying the game over message. gameover

Code validation

  • Python Coding validation. The code run without returning any error and no erros are flagged in pyling

Fixed bugs

  • Fixing bug UnboundLocalError in attack_roll function Issue21
  • Fix input validation in encounter function Issue27

Deployment

  • Heroku Deployment
    • Navigate and login to Heroku and login it
    • Click in Settings, under builpacks select:
      • Python, NodeJS in this order first Python, second nodejs
    • In Config Vars click in Add and add the following
      • PORT , 8000
    • Once that is completed. Click in Deploy
      • In Deploy Method clink under GitHub
      • Connect your Github repository to Heroku
      • At the bottom under Manual Deployment select the Branch you want to deploy. Main by default
      • Click in Deploy Branch
      • Click in the View button to open deployed app.
  • Local deployment
    • Execute in terminal node index.js inside the project's folder
    • If there is any errors we will need to install further modules. The most common total, in the terminal entry npm install total
    • Execute again node index.js
    • By default it uses local host port 8000 . Navigate in your browser to http://localhost:8000/
    • Click in run program if the program do not start automatically

Credits

the-gem-in-the-tower's People

Contributors

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