public Facility(FacilityType t) { type = t; name = t.ToString(); //TODO status = Status.Ok; assignedBot = null; }
public JSONObject jsonify() { JSONObject json = new JSONObject(JSONObject.Type.OBJECT); json.AddField("level", level); json.AddField("type", type.ToString()); json.AddField("exercise", exercise.jsonify()); return(json); }
public void Selected_NoSelected_ErrorMessageWithCorrectFacility(FacilityType type) { var model = new ManageAatfsViewModel() { FacilityType = type }; ValidationContext validationContext = new ValidationContext(model, null, null); IList <ValidationResult> result = model.Validate(validationContext).ToList(); Assert.True(result.Count() > 0); Assert.Equal(string.Format("You must select an {0} to manage", type.ToString().ToUpper()), result[0].ErrorMessage); }
public void BuyFacility(FacilityType desiredType) { // TODO int cost = Prices.facilPrices[desiredType]; bool success = SpendMoney(cost); if (success) { Facility newFac = new Facility(desiredType); facilities.Add(newFac); } System.Console.WriteLine( PurchaseResult(desiredType.ToString().ToLower(), success, cost)); }