Skip to content

Commit

Permalink
Added Sleep class
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarrasch committed Feb 18, 2011
1 parent c1c44c1 commit 626110c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 91 deletions.
13 changes: 10 additions & 3 deletions Global.jr
Expand Up @@ -22,17 +22,24 @@ public class Global {
public static int tableCapacities = 10;
public static int startGlassCount = 10;
public static int startCupsCount = 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 timeToDrinkBeverage = 100;

// Private constants
private final static int BEER_DRINKING_TIME = 100;
private final static int CAPPUCINO_DRINKING_TIME = 100;
private final static int CHOCLATE_DRINKING_TIME = 100;
private final static int BEER_DRINKING_TIME = 10;
private final static int CAPPUCINO_DRINKING_TIME = 10;
private final static int CHOCLATE_DRINKING_TIME = 10;

// 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");
Expand Down
14 changes: 0 additions & 14 deletions JRProcess.j_r

This file was deleted.

Empty file added Simulation.jr
Empty file.
9 changes: 9 additions & 0 deletions Sleep.jr
@@ -0,0 +1,9 @@
import edu.ucdavis.jr.*;
import java.util.*;

public class Sleep {
public static void now(int simulationSeconds)
{
JR.nap(simulationSeconds * Global.timeFactor);
}
}
49 changes: 0 additions & 49 deletions unused/Monitor.jr

This file was deleted.

25 changes: 0 additions & 25 deletions unused/SimpleClock.jr

This file was deleted.

0 comments on commit 626110c

Please sign in to comment.