// switch statement here, giving a measured response according to current BuzzLevel public void Comment(Human myCustomer) { switch (myCustomer.currentBuzzLevel) { case Human.BuzzLevel.Sober: ColorLine("Bartender: Hello "+myCustomer.Name +", your drink is coming right up.. how is the weather outside?"); break; case Human.BuzzLevel.Rare: ColorLine("Bartender: Your drink is coming right up " + myCustomer.Name + ", it's a rare treat in here to have customers like you!"); break; case Human.BuzzLevel.Medium: ColorLine("Bartender: Ok, " + myCustomer.Name + ", your drink is coming right up, medium size.."); break; case Human.BuzzLevel.Well_Done: ColorLine("Bartender: Your drink is coming right up " + myCustomer.Name + ", almost done.."); break; case Human.BuzzLevel.Toasted: ColorLine("Bartender: Here you go " + myCustomer.Name + ", this is the right one.."); break; case Human.BuzzLevel.Fairly_Silly: ColorLine("Bartender: " + myCustomer.Name +", your drink is coming right up, this is silly.."); break; case Human.BuzzLevel.Plain_Stupid: ColorLine("Bartender: " +myCustomer.Name +", is this not a bit stupid.."); break; case Human.BuzzLevel.Wasted: ColorLine("Bartender: A drink is wasted on you " + myCustomer.Name + "..."); break; case Human.BuzzLevel.Brain_Has_Left_The_Building: ColorLine("Bartender: " + myCustomer.Name +", your brain has left the building"); break; default: ColorLine("Bartender: One moment, " + myCustomer.Name + "..."); break; } }
public void ThrowPunch(Human otherGuy) { if((int)this.currentDamageLevel < 6) { ColorLine(Name + " hits " + otherGuy.Name); otherGuy.currentDamageLevel++; } }
public void Fine(Human customer, Human policeman) { ColorLine(policeman.Name + ": " + customer.Name + " I am giving you af fine of 1000 kr."); }
public void Arrest(Human customer, Human policeman) { ColorLine(policeman.Name + ": I am arresting " + customer.Name); }