首页 > > 详细

program讲解、Python语言辅导、Python编程调试、辅导data 辅导Python编程|讲解Processing

O V E R V I E W
We will be using variables, functions, and conditionals to recreate Oregon Trail in Python! The goal is to travel from NYC to Oregon (2000 miles) by Dec 31st. However, the trail is arduous. Each day costs you food and health. You can hunt and rest, but you have to get there before winter!

B E H A V I O R
Player starts in NYC on 03/01 with 2,000 miles to go, 500lbs of food, and 5 health. The player must get to Oregon by 12/31
At the beginning of the game, user is asked their name.
Each turn, the player is asked what action they choose, where the player can type in the following: travel, rest, hunt, status, help, quit
On average, the player’s health will randomly decrease twice during a month on any given day.
The player eats 5lbs of food a day.
If the player’s health drops to 0 or the player runs out of food, the player dies and it is game over.
travel: moves you randomly between 30-60 miles and takes 3-7 days (random).
rest: increases health 1 level (up to 5 maximum) and takes 2-5 days (random).
hunt: adds 100 lbs of food and takes 2-5 days (random).
status: lists food, health, distance traveled, and day.
help: lists all the commands.
quit: will end the game.

I M P L E M E N T A T I O N
Create functions for all options a player can take
Use global variables to keep track of player health, food pounds, miles to go, current day, current month
Create a function advance_game_clock(num_days) which calls upon other functions to update the day
Use global list to keep track of which months have 31 days and use this in the advance_game_clock function (i.e.: MONTHS_WITH_31_DAYS = [1, 3, 5, 7, 8, 10, 12])
Use standard notation for variables, functions, and GLOBALS
E X T R A C R E D I T
Make the rate of food consumption be a function of activity. So if a player hunts for a turn they take up more food, but if they rest they take up less food.

Create a random event that occurs randomly once a month, like a river crossing or a dysentery, that will take up a range of 1-10 food, 1-10 days and 0-1 health.

Travel with three family members. Each family member also has their own health variable that can randomly decrease during the journey. (Only one family member needs to survive to win the game)

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!