コード例 #1
0
        void GenerateKitchen()
        {
            kitchen = new Kitchen(new Cargo(0.80, 1.05, new DeliveryBasic(DELIVERY_TYPE.All, 0.90, CargoDeliverTime, 1.53)));

            kitchen.AddStaff(new KitchenStaff(new Staff(Human.GenerateName(), "Povar Middle", Human.GenerateName(), Human.GenerateName()), 2.10, 1500));
            kitchen.AddStaff(new KitchenStaff(new Staff(Human.GenerateName(), "Povar Junior", Human.GenerateName(), Human.GenerateName()), 0.90, 150));
            kitchen.AddStaff(new KitchenStaff(new Staff(Human.GenerateName(), "Povar Junior", Human.GenerateName(), Human.GenerateName()), 0.90, 200));
            kitchen.AddStaff(new KitchenStaff(new Staff(Human.GenerateName(), "Povar Junior", Human.GenerateName(), Human.GenerateName()), 0.90, 200));
            kitchen.AddStaff(new KitchenStaff(new Staff(Human.GenerateName(), "Povar Junior", Human.GenerateName(), Human.GenerateName()), 0.90, 100));
            kitchen.AddStaff(new KitchenStaff(new Staff(Human.GenerateName(), "Povar Junior", Human.GenerateName(), Human.GenerateName()), 0.90, 100));

            kitchen.WeeklyDeliver();
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: Team-on/works
        public void PickPizzas(Kitchen kitchen)
        {
            int pizzaCnt = Rand.rand.Next(1, 4);

            while (pizzaCnt-- != 0)
            {
                Pizza pizza;
                while (!kitchen.CanMake(pizza = PizzaLoader.RandomPizza()))
                {
                    ;
                }
                AddPizza(pizza);
            }
        }
コード例 #3
0
ファイル: Client.cs プロジェクト: Team-on/works
 public void RePickPizzas(Kitchen kitchen, Pizza _pizza)
 {
     for (int i = 0; i < wantOrder.Count; i++)
     {
         if (wantOrder[i].Name == _pizza.Name)
         {
             wantOrder[i] = PizzaLoader.RandomPizza();
             int cnt = 0;
             while (!kitchen.CanMake(wantOrder[i] = PizzaLoader.RandomPizza()))
             {
                 if (++cnt > 1000)
                 {
                     wantOrder[i] = PizzaLoader.Fokacha();
                     break;
                 }
             }
         }
     }
 }