Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (30 sloc) 0.798 kB
import edu.ucdavis.jr.*;
import java.util.*;
import java.util.ArrayList;
public abstract class Mixologist extends Person {
public Mixologist(String name)
{
super(name);
}
protected int numServings = 0;
protected boolean mixDrink(Beverage drink)
{
if(knowsItsClosed())
{
return false;
}
numServings++;
List<Item> items = new ArrayList<Item>(drink.getIngredients());
items.add(drink.getBeverageWare()); // The beverageware should be included
for(Item item : items)
{
call Global.cupboard.aquireItem(item);
}
Sleep.now(Global.drinkMixingTime);
for(Item item : drink.getIngredients())
{
call Global.cupboard.putBackItem(item);
}
return true;
}
}
Jump to Line
Something went wrong with that request. Please try again.