static void Main(string[] args) { Table table = new Table(); Servant servant = new Servant(); Smoker[] smokers = { new Smoker(Resource.TypeEnum.MATCHES), new Smoker(Resource.TypeEnum.TOBACCO), new Smoker(Resource.TypeEnum.PAPER) }; SmokingRoom room = new SmokingRoom(table, servant, smokers); room.startSmoking(); }
public SmokingRoom(Table table, Servant servant, Smoker[] smokers) { this.table = table; this.servant = servant; this.smokers = smokers; }