Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import string
- #-Pointless functions a'ka Matte is too lazy to make this code Object-Oriented
- def determineIfGivenStringSeemsToBeIntegerValueOrNot (test_value): #-Commentary not needed.
- try:
- int(range_max)
- except ValueError, TypeError:
- return False
- else:
- return True
- #-----------------------------------------------------------------------
- print 'The Ultimate Game About Guessing Additive Numbers from range 1 to X'
- while True:
- range_max = 0
- nmbr_to_guess = 0
- wild_guess_of_player = 0
- tries = 0
- really_sure_to_exit = False
- #-----------------------------------------------------------------------
- while True:
- range_max = raw_input('Choose number for Your Maximum Range: ')
- if determineIfGivenStringSeemsToBeIntegerValueOrNot(range_max):
- range_max = int(range_max)
- break
- else:
- print 'No shit! Im still not that drunk to not recognize what kind of shit are you typing right there!\nTry Again!'
- #-----------------------------------------------------------------------
- print 'You made it! Now Ill try to think out a number from 1 to ', range_max
- nmbr_to_guess = random.randint(1, range_max)
- print 'Pheh! That was easy, I guess that II will be good for You!'
- print '''Oh wait! Are You blind? thats not a number, just two capital i's '''
- print 'Enough making fun of You! Now You have to use Your brain to generate random number!'
- #-----------------------------------------------------------------------
- while True:
- wild_guess_of_player = raw_input('Please, tell me Your guess: ')
- #print 'SOME DEBUG\nrange_max: ', range_max,'\nnmbr_to_guess: ', nmbr_to_guess, '\nwild_quess_of_player: ', wild_guess_of_player, '\ntries: ', tries
- if not determineIfGivenStringSeemsToBeIntegerValueOrNot(wild_guess_of_player):
- print 'Im not that Stupid, mate!'
- else:
- wild_guess_of_player = int(wild_guess_of_player)
- if wild_guess_of_player > range_max:
- print 'Bueheheheh. Nice try, But the answer is: WHAT THE FUCK ARE YOU TRYING TO DO'
- else:
- if wild_guess_of_player < nmbr_to_guess:
- print 'Im thinking about higher number, Check in google what is after ', wild_guess_of_player, ' You dumb fuck!'
- if wild_guess_of_player > nmbr_to_guess:
- print 'Tm thinking about lower values. Your terapist never said to You that You are too self confident?'
- if wild_guess_of_player == nmbr_to_guess:
- print 'Bravo, You are a great person! You made it!'
- if tries >= 3:
- print 'Wait! Not so fast! You are so dumb that even pointless game is too har for You!'
- break
- tries += 1
- print 'Well, Thats all, folk! Wanna play again?'
- while True:
- replay = string.lower(raw_input('(Y)es / (N)o'))
- print replay
- if replay == 'n':
- print 'FUCK YOU!'
- really_sure_to_exit = True
- break
- if replay != 'n' and replay != 'y':
- print 'I said! Game is over. And You are still trying to cheat? Do it again, You little fuck!'
- if replay == 'y':
- print 'Well, play with me again!'
- break
- if really_sure_to_exit:
- break
Add Comment
Please, Sign In to add comment