Skip to content

Instantly share code, notes, and snippets.

@r35krag0th
Created August 22, 2012 15:47
Show Gist options
  • Save r35krag0th/3426929 to your computer and use it in GitHub Desktop.
Save r35krag0th/3426929 to your computer and use it in GitHub Desktop.
Lunch Magic
class NomVenue:
name = None
meatIndex = 0
boozeIndex = 0
patioEnabled = False
def __init__(self, someName="Unknown Venue", isPatioEnabled=False, theMeatIndex=0, theBoozeIndex=0):
self.name = someName
self.setMeatIndex(theMeatIndex)
self.setBoozeIndex(theBoozeIndex)
self.patioEnabled = isPatioEnabled
def setMeatIndex(self, newMeatIndex=0):
if (newMeatIndex < 0 or newMeatIndex > 5):
print ">>> Dear Human: Please use 1-5 on the Meat Index"
return
self.meatIndex = newMeatIndex
def setBoozeIndex(self, newBoozeIndex=0):
if (newBoozeIndex < 0 or newBoozeIndex > 5):
print ">>> Dear Human: Please use 1-5 on the Booze Index"
return
self.boozeIndex = newBoozeIndex
## Should we try to compute bias here or in the root program?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment