python health & love game(3)

2778 ワード

main.py
#!/usr/bin/python
#_*_coding:utf-8_*_


'''
 I create a psychological game , here's 5 parts of the game :
 Body_Health,Love,Inter_Communication,Internet and Study.
 Creater : lippor
 Time:Mon Mar 20
     :
    class:  _  
    def:  _  
    doc:  _  
    parameter:     _  
    module:     _  
 '''
 
 
 
import random
import os
import sys
import re
import time

#        
import Body_Health
import Love
import Inter_Communication
import Internet
import Study

 


#     Tab    KEY      。
Part = {
1:'Body_Health:
\tThis is the capital of our revolution.', 2:"Love:
\tlove is the world's most warm seek.", 3:'Inter_Communication:
\twithout you, I will accomplish nothing.', 4:'Internet:
\tthe spider is not terrible, terrible is unable to find the direction of the spider.', 5:'Study:
\twe can not give up the pursuit of excellence in life.' } # the main def # : def Game_Start(): print """ Welcome to take part in this wonderful psychological game ! At the begging,you need make a choice from the follow five parts in Random Mode : Body_Health,Love,Inter_Communication,Internet and Study. Are you ready ? (Y & N) """ Begin_Chioce = raw_input('> ') Game_Chioce(Begin_Chioce) # : def Game_Chioce(Begin_Chioce): if Begin_Chioce == 'Y': #print "You are very lucky,you choose the part:", random.randint(1, 6) #print "You are very lucky,you choose the part:", int(random.randint(1, 6)) #Choose = Part[int(random.randint(1, 6))] Choose = Part[2] print "You are very lucky,you choose the part:%s"%Choose if Choose == Part[1]: # , 。 #B = Body_Health.body_health() Body_Health.start() print "Do you want to go on this interesting game? Y or N" Go_On = raw_input('> ') if Go_On == 'Y': Game_Start() else: print "Thanks for your playing! Welcome to play this game again ! Bye~" #Body_Health.body_healt.start() elif Choose == Part[2]: #print "ll" #L = Love.love() Love.start() elif Choose == Part[3]: print "ll" #inter_communication.start() elif Choose == Part[4]: print "ll" #internet.start() elif Choose == Part[5]: print "ll" #study.start() else: print "the system has an error *^*" Game_Start()