package city.market;

import city.PersonAgent;
import city.Place;
import city.market.interfaces.MarketCashier;
import city.market.interfaces.MarketEmployee;

public class Market extends Place{
	
	boolean open;
	public MarketCashier MarketCashier;
	public MarketEmployee MarketEmployee;
	
	public Market(){
		super();
		MarketCashier = new MarketCashierRole(null,this);
		MarketEmployee = new MarketEmployeeRole(null,this);
	}
		
	public void updateMarketStatus(){
		if (MarketCashier == null || MarketEmployee == null)
			open = false;
		else
			open = true;
	}
	
	public MarketCustomerRole generateCustomerRole(PersonAgent p){
		return (new MarketCustomerRole(p,this));
	}
}

@@ -149,16 +149,55 @@
 mployee;
+%0Aimport city.transportation.TruckAgent;
 %0A%0Apublic
@@ -318,16 +318,42 @@
 ployee;%0A
+%09public TruckAgent truck;%0A
 %09%0A%09publi
@@ -427,16 +427,16 @@
 ,this);%0A
-
 %09%09Market
@@ -481,16 +481,122 @@
 ,this);%0A
+%09%09truck = new TruckAgent(this);%0A%09%7D%0A%09%0A%09public void msgPickUpItems()%7B%0A%09%09//gui.removeFirstRestaurantOrder();%0A
 %09%7D%0A%09%09%0A%09p

add truck constructo