示例#1
0
	dict_bawls = {'odds1' : [5,4,3,2,1], 'odds2': [1,1,1,1,11], 'odds3' : [4,4,3,3,1], 'winmessage' : "You have won 200 credits", 'drinkobj': bawls}
	all_drink = {'coke': dict_coke, 'welchs': dict_welchs, 'ibc': dict_ibc, 'jolt': dict_jolt, 'bawls': dict_bawls}
	drink_array = [coke, welchs, ibc, jolt, bawls]
	
	##Creates slot1
	##Executes makeSlot to add drinks ino slot1's array based on coke's odds1
	slot1 = Slot()
	makeSlot('coke', 'odds1', slot1, all_drink, drink_array)

	##For debugging
	##print (len(slot1.Drinks))
	
	##Pauses for suspense
	time.sleep(1)
	##Picks drink, assigns name, prints
	test1 = slot1.pickDrink()
	cprint (test1.getName(), test1.printName())
	
	##Creates slot2
	##Executes makeSlot to add drinks ino slot2's array based on first slot's drink using odds 2
	slot2 = Slot()
	makeSlot(test1.getName(), 'odds2', slot2, all_drink, drink_array)
	
	time.sleep(1)
	
	##Picks drink, assigns name, prints
	test2 = slot2.pickDrink()
	cprint (test2.getName(), test2.printName())
	
	##Creates slot3
	##Executes makeSlot to add drinks ino slot3's array based on first and second slots' drinks using odds 3