Example #1
0
	public int EvalType(TeaType _teaType)
	{
		if (_teaType == type)
		{
			return FULL_MARKS;
		}
		return 0;
	}
Example #2
0
        public Tea(int milk, int water, int ice, TeaType type)
        {
            this.Milk  = milk;
            this.Water = water;
            this.Ice   = ice;
            this.Type  = type;

            this.Time = (milk + water + ice) / 3;
        }
Example #3
0
 public Tea(String name, String altname, TeaType type, ushort baseseconds, ushort plusseconds, ushort temp, ushort maxinfusions)
 {
     this.Name         = name;
     this.AltName      = altname;
     this.Type         = type;
     this.BaseSeconds  = baseseconds;
     this.PlusSeconds  = plusseconds;
     this.Temp         = temp;
     this.MaxInfusions = maxinfusions;
 }
        static List<Tea> ListTeasByType(TeaType teaType)
        {
            using (var ds = new DocumentStore { Url = DATABASEURL }.Initialize())
            {
                using (var session = ds.OpenSession(DATABASE))
                {
                    List<Tea> dbTeas = (from teas in session.Query<Tea>()
                                        where teas.TeaType == teaType
                                        select teas).ToList<Tea>();

                    return dbTeas;
                }
            }
        }
Example #5
0
        static List <Tea> ListTeasByType(TeaType teaType)
        {
            using (var ds = new DocumentStore {
                Url = DATABASEURL
            }.Initialize())
            {
                using (var session = ds.OpenSession(DATABASE))
                {
                    List <Tea> dbTeas = (from teas in session.Query <Tea>()
                                         where teas.TeaType == teaType
                                         select teas).ToList <Tea>();

                    return(dbTeas);
                }
            }
        }
 public Tea GetTea(TeaType herb, TeaAmount watter)
 {
     switch (herb)
     {
         case TeaType.Black:
             return new Tea(TeaType.Black.ToString(), (int)watter);
         case TeaType.Cammomile:
             return new Tea(TeaType.Cammomile.ToString(), (int)watter);
         case TeaType.Mint:
             return new Tea(TeaType.Mint.ToString(), (int)watter);
         case TeaType.Thyme:
             return new Tea(TeaType.Thyme.ToString(), (int)watter);
         default:
             throw new ArgumentException();
     }
 }
Example #7
0
        public double GetTotalPrice(double amount, TeaType teaType)
        {
            double TotalPrice = 0;

            if (teaType == TeaType.EnglishBreakfast)
            {
                TotalPrice += amount * 10;
            }
            else if (teaType == TeaType.GreenTea)
            {
                TotalPrice += amount * 5;
            }
            else if (teaType == TeaType.WhiteTea)
            {
                TotalPrice += amount * 8;
            }
            return(TotalPrice);
        }
Example #8
0
        public String FormatTeaType(TeaType type)
        {
            String formatted;

            switch (type)
            {
            case TeaType.MedicinalHerbs:
                formatted = "Medicinal Herbs";
                break;

            case TeaType.RawPuerh:
                formatted = "Raw Puerh";
                break;

            default:
                formatted = type.ToString();
                break;
            }
            return(formatted);
        }
Example #9
0
 public Tea(TeaType type = TeaType.Black)
     : base(type.ToString() + " Tea")
 {
 }
Example #10
0
 public Tea(TeaType teaType)
     : base($"{teaType.ToString()} tea")
 {
 }
Example #11
0
	public void Randomise()
	{
		temperature = Random.Range(0,3)*20 + 10; // 10, 30, 50 (0-60)
		type = (TeaType) UnityEngine.Random.Range(0,(int)TeaType.NUM);
		strength = Random.Range(0,3)*20 + 10; // 10, 30, 50 (0-60)
		cup = (CupType) UnityEngine.Random.Range(0,(int)CupType.NUM);
		sugar = Random.Range(0,3)*2 + 1; // 1, 3, 5 (0-6)
	}