Character creating program ie Dungeons and Dragons.
Player has 30 points to spend on 4 attributes - strength, health, wisdom, and dexterity.
Player should be able to spend points from the pool on any attribute and should be able to take points from an attribute and put them back into the pool.
Currently i'm able to deduct points how do you return it back to the pool?
Also is there an easy method from preventing the player from entering more points than what the pool has?
# Character Development Dungeons and Dragons # pool are the total points that I can use. pool = 30 strength = 0 health = 0 wisdom = 0 dexterity = 0 choice = None while choice !="0": print \ """ Character Development 0 - Exit 1 - attributes """ choice = raw_input("Choice: ") print # exit if choice == "0": print "Good-bye." # Strength points elif choice == "1": strength = int(raw_input("How much strength points do you want?: ")) print "Your Strength points are", strength health = int(raw_input("How much health points do you want?: ")) print "Your health points are", health wisdom = int(raw_input("How much wisdom points do you want?: ")) print "Your wisdom points are", wisdom dexterity = int(raw_input("How much dexterity points do you want?: ")) print "Your dexterity points are", dexterity balance = int(pool-strength-health-wisdom-dexterity) print "After deducting all your attribute points you have", balance , "total points left", # some unknown choice else: print "Sorry, but", choice, "isn't a valid choice." raw_input("\n\nPress the enter key to exit.")