Beispiel #1
0
 public void AddFinishedPattyToStack(CookingDegrees cookingDegree)
 {
     foreach(Patty ps in PattySlots)
     {
         if(!ps.Used)
         {
             ps.CookingDegree = cookingDegree;
             ps.Used = true;
             string pattyDegree = Enum.GetName(typeof (CookingDegrees), cookingDegree);
             Log.AddMessage("Finished cooking " + pattyDegree + " patty.", Log.LoggingLevel.Debug);
             return;
         }
     }
 }
Beispiel #2
0
        public bool PutPattyOnGrill(CookingDegrees cookingDegrees)
        {
            Log.AddMessage("Putting new patty on grill", Log.LoggingLevel.Debug);
            if (Movement.CurrentLocation != Movement.Location.GrillStation)
            {
                Movement.MoveTo(Movement.Location.GrillStation);
                return false;
            }
            foreach (GrillSlot gs in grillSlots)
            {
                if (!gs.Used)
                {
                    switch (cookingDegrees)
                    {
                        case CookingDegrees.Rare:
                            gs.FlipTime = DateTime.Now.AddSeconds(15);
                            gs.CookingDegree = cookingDegrees;
                            break;
                        case CookingDegrees.Medium:
                            gs.FlipTime = DateTime.Now.AddSeconds(30);
                            gs.CookingDegree = cookingDegrees;
                            break;
                        case CookingDegrees.WellDone:
                            gs.FlipTime = DateTime.Now.AddSeconds(50);
                            gs.CookingDegree = cookingDegrees;
                            break;

                    }
                    FlashAutomation.DragDrop(63, 328, gs.X, gs.Y);
                    FlashAutomation.AntiHover(gs.X, gs.Y);
                    gs.Used = true;
                    Update();
                    Log.AddMessage("Put patty on grill", Log.LoggingLevel.Debug);
                    return true;
                }
            }
            Log.AddMessage("ERROR: All grillSlots were used, could not put patty on grill", Log.LoggingLevel.Error);
            return false;
        }
Beispiel #3
0
 public Patty(int x,int y)
 {
     X = x;
     Y = y;
     Used = false;
     CookingDegree = CookingDegrees.WellDone;
 }
Beispiel #4
0
 private Point GetMeat(CookingDegrees cd)
 {
     Point result = Point.Empty;
     foreach(Patty ps in PattySlots)
     {
         if(ps.Used && ps.CookingDegree == cd)
         {
             ps.Used = false;
             result = new Point(ps.X, ps.Y);
             break;
         }
     }
     Update();
     return result;
 }