Question
Random game creator in Python? Instructions : Imagine the player is exploring a location, whether it's an old castle or a hidden cave. As they
Random game creator in Python?
Instructions:
-
Imagine the player is exploring a location, whether it's an old castle or a hidden cave. As they explore different spots within the location, they may find treasure (gain points) or encounter some hazard (lose points)
-
Complete the list of locations with text strings that represent different spots in the location the player is exploring
-
Assume the player starts at 0 points. Decide what will be a winning score. The player will move through the location until they gain enough points to reach the winning score.
-
Each turn through the while loop, print the value of a random choice from the locations list.
-
Get a random integer for points from this room. Allow the possibility to get a negative value. So for example, between -3 and 10 as possible random integers.
-
Add (or subtract) that random number to the player score.
-
Once the player has won, print a winning message and their final score.
-
There is no need for user input in this game. The computer is making random choices for the player.
I have no idea how to start a script according to the instructions. If possible, can you add a picture of the code with the output?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started