# Global Variables km_travelled = 0 thirst = 0 camel_tiredness = 0 natives_travelled = -20 # Player always starts 20 km away from player once player reaches checkpoint canteen = 3 done = False def introduction(): print("Welcome to Camel!") print("You have stolen a camel to make your way across the great Mobi desert") print("The natives want their camel back and are chasing you down! Survive ") print("your desert trek and out run the natives \n \n") def choices(): print("1. Drink from your canteen.") print("2. Ahead at moderate speed.") print("3. Ahead at full speed.") print("4. Stop for the night.") print("5. Status check.") print("9. Quit \n") def questions(answer, canteen): if "9" in answer: print("GAME EXIT.") done = True elif "1" in answer: if canteen >= 0: canteen -= 1 print("You drank from the canteen") print(canteen) # For debugging purposes else: print("There is nothing left in your canteen!") else: return 0 def main(): # Go through once introduction() while not done: choices() answer = input("What is your choice? ") questions(answer, canteen) if __name__ == '__main__': main()