Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview This assignment will require you to combine your knowledge of conditionals and loops by writing your own adventure game! The premise of the game

Overview
This assignment will require you to combine your knowledge of conditionals and
loops by writing your own adventure game! The premise of the game is simple. You
are a brave adventurer exploring a castle full of unknowns in search of treasure. At
each step you must choose where to visit next. But be careful...surprises await!
The Assignment
The structure of the program is simple. The player starts at the entrance to the
castle. They are then asked what room they would like to visit. When they visit that
room, a brief description of the room and what they found there is printed, and then
they are asked to choose another room to visit next. If they player chooses to visit
the exit, then the game ends. Similarly, if the player finds the treasure in a room, the
game ends. You may have as many rooms as you like, within the following
constraints:
You must have at least 6 rooms
Not every room is reachable from every other room.
Some backtracking must be allowed.
The game must have several alternative endings.
So basically, the program is a large loop with several conditionals corresponding to
the room to be visited, which each of those conditionals handling what happens in
each room.
Because the world is a scary place, and nobody lives forever, you will also
incorporate a random number generator that will give you a small probability of death
at any step. A random number can be simulated with a call to random.randint (1,100)
which generates a uniform random number in 1,100.(If you assume values >98
mean death, then you will have a 150 chance of dying.) You can change these odds
to whatever you like. Make sure to import the random module (i.e. import random).
This assignment is purposefully open ended. Be creative and have fun!
Getting Started
Not sure where to begin? Review How to Approach Programming Assignments.
For this project, it would probably be easiest to start with the main game loop and a
small handful of rooms, testing that it's possible to win the game. Then implement
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions