Skip to content

ShauravT/text-adventure-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adventure Game

  • Nanodegree: Intro to Programming
  • Module: Python

Project Summary

The project is a text based adventure game.

Main technologies

  • Python

Project Requirements

  • Descriptions are printed to the console for the player to see.
  • The time.sleep function is used to create delays between messages so that they aren't all printed at once.
  • The random.choice or random.randint function is used to influence the game so that each game is different in some way.
  • The input function is used to ask the player what they would like to do.
  • The player's choices affect what happens in the game, including:
    • Whether the player wins or loses
    • Whether to restart or exit after the game is over
  • If the player enters a choice that is not valid, the game gives them the chance to retry until they enter a valid option.
  • The game does not crash and does not treat invalid input as a valid choice.
  • The code includes at least four function definitions that are used to improve the code in some way, such as by:
    • Reducing repetition
    • Reducing complexity
    • Improving the readability or organization of the code
  • Each function should have a single purpose and a name that describes that purpose.
  • The pycodestyle tool reports zero errors and zero warnings.
  • The program is a playable game, and runs from start to finish without crashing or displaying errors.

Install

  • Clone project:
git clone https://github.com/Shaurav43/adventure_game.git
  • Install dependencies:

Python

  • Pycodestyle: You can install, upgrade, and uninstall pycodestyle.py with these commands:
$ pip install pycodestyle
$ pip install --upgrade pycodestyle
$ pip uninstall pycodestyle
  • Run project on terminal
python3 game.py

License

adventure game is MIT licensed.

About

A text based adventure game based on random events

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages