stuff
This commit is contained in:
25
examples/monty-hall-problem/views.py
Normal file
25
examples/monty-hall-problem/views.py
Normal file
@ -0,0 +1,25 @@
|
||||
class View:
|
||||
def get_name(self):
|
||||
print('\033c')
|
||||
print('Welcome to the Monty Hall Problem!')
|
||||
return input('Please enter your name: ')
|
||||
|
||||
def display_doors(self):
|
||||
print('\033c')
|
||||
print('Doors: [ 1 ] [ 2 ] [ 3 ]')
|
||||
return input('Select door: ')
|
||||
|
||||
def host_twist(self, message):
|
||||
print('The host will revel where one goat is...')
|
||||
print(message)
|
||||
print('Would you like to change your selection? [n/y]')
|
||||
return input('[n]: ')
|
||||
|
||||
def out_come(self, message):
|
||||
print('You {}!!!'.format(message))
|
||||
return input('Play again?[y]')
|
||||
|
||||
if __name__ == '__main__':
|
||||
print('Please opne controller.py')
|
||||
exit()
|
||||
|
Reference in New Issue
Block a user