Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (57 sloc) 2.65 KB
import edu.ucdavis.jr.*;
import java.util.*;
public class Global {
// Global objects in the bar
// Persons
public static Assistant assistant;
public static Barmaid barmaid;
public static Landlord landlord;
// Stuffs
public static Door door;
public static Cupboard cupboard;
public static List<Table> tables = new ArrayList<Table>();
public static Clock clock;
// Orderingchannel
public static cap boolean(Beverage) orderingChannel;
// Global objects in the bar
// Constants
public static int tableCapacities = 10;
public static int startGlassCount = 10;
public static int startCupsCount = 10;
public static int numTables = 10;
// Time-Constants
public static int assistantNappingTime = 100;
public static int drinkMixingTime = 10;
public static int timeItTakesToCleanGlass = 2;
public static int startNumberOfOrders = 5;
public static int simulationTimeInSeconds = 30*60;
// Private constants
private final static int BEER_DRINKING_TIME = 30;
private final static int CAPPUCINO_DRINKING_TIME = 60;
private final static int CHOCLATE_DRINKING_TIME = 50;
// Simulation time
// One second (1000ms) takes timeFactor ms in simulation.
public static int timeFactor = 10;
// Ingredients
public final static Item beerTap = new Item("Beer tap");
public final static Item coffee = new Item("Coffee");
public final static Item milk = new Item("Milk");
public final static Item choclatePowder = new Item("Choclate Powder");
public final static List<Item> IngrediensList =
Arrays.asList(beerTap, coffee, milk, choclatePowder);
// Beveragewares
public final static BeverageWare glass = new BeverageWare("Glass", 1);
public final static BeverageWare cup = new BeverageWare("Cup", 2);
public final static List<Item> allItemsList =
Arrays.asList(beerTap, coffee, milk, choclatePowder, glass, cup);
// Required Ingredients
private final static List<Item> beerIngredients = Arrays.asList(beerTap);
private final static List<Item> cappucinoIngredients = Arrays.asList(milk, coffee);
private final static List<Item> choclateIngredients = Arrays.asList(milk, choclatePowder);
// Beverages
public final static Beverage beer = new Beverage("Beer", BEER_DRINKING_TIME, glass, beerIngredients);
public final static Beverage cappucino = new Beverage("Cappucino", CAPPUCINO_DRINKING_TIME, cup, cappucinoIngredients);
public final static Beverage choclate = new Beverage("Choclate", CHOCLATE_DRINKING_TIME, cup, choclateIngredients);
public final static List<Beverage> beverageList =
Arrays.asList(beer, cappucino, choclate);
}
Jump to Line
Something went wrong with that request. Please try again.