public LotController(UserManager <User> userManager, IUser iUser, ILot iLot, IPurchase iPurchase) { _user = iUser; _lot = iLot; _userManager = userManager; _purchase = iPurchase; }
public AnswerFabric(IStatus status, IReplicStorage rs, ILot Lot) { checker = status; replics = rs; lot = Lot; //_dPart = DialogPart.noDial; }
public BaseLot(ILot lot) : base(lot) { AuctionPeriod = lot.AuctionPeriod; AuctionUrl = lot.AuctionUrl; Status = lot.Status; }
public AnswerGenerator(IDBProcCaller caller, ILot lotMaker, ILunch lunchMaker) { procCaller = caller; lot = lotMaker; lunch = lunchMaker; category = SkillCategory.no; }
public void Checkin(VehicleSize vehicleSize, ILot lot) { Lot _lot = lot as Lot; if (_lot == null) throw new ArgumentException("lot is not of vehicleSize Lot"); int cost = (int)vehicleSize; Lots[_lot.Saturation].Remove(_lot); _lot.Saturation -= cost; Lots[_lot.Saturation].Add(_lot); }
public void AddLot(ILot lot) { lock (LotList) { if (lot != null) { this.LotList.Add(lot); } } }
public static MicronBEAssyPlanInfo CreatePlanInfo(ILot lot, Mozart.SeePlan.DataModel.Step task) { MicronBEAssyPlanInfo plan = new MicronBEAssyPlanInfo(); MicronBEAssyBELot beLot = lot as MicronBEAssyBELot; plan.Init(task); plan.LotID = lot.LotID; plan.UnitQty = lot.UnitQty; plan.ProductID = beLot.Product.ProductID; plan.ProcessID = beLot.Process.ProcessID; return(plan); }
private bool canBuildRandomStreet(ILot[,] grid, int x, int z) { if (x <= 0 || x >= grid.GetLength(0) - 1 || z <= 0 || z >= grid.GetLength(1) - 1) { return(false); } ILot[] lots = new ILot[] { grid[x + 1, z + 1], grid[x - 1, z + 1] }; foreach (ILot lot in lots) { if (lot != null && lot.lotType == LotType.Street) { return(false); } } return(true); }
public bool TryCheckout(VehicleSize vehicleSize, out ILot lot) { int cost = (int)vehicleSize; foreach (int saturationIndex in new int[] { 1, 0 }) { if (2 - saturationIndex < cost || Lots[saturationIndex].Count == 0) continue; Lot _lot = Lots[saturationIndex].First(); _lot.Saturation += cost; Lots[saturationIndex].Remove(_lot); Lots[_lot.Saturation].Add(_lot); lot = _lot; return true; } lot = null; return false; }
/// <summary>Be sure that the index you are sending is of a valid LOT!</summary> private void GenerateApple(ILot[,] lots, int x, int z, List <Lot> apple) { Lot thisLot = (Lot)lots[x, z]; apple.Add(thisLot); for (int i = 0; i < 2; i++) { Vector2 lotIndex = new Vector2(i == 0 ? x + 1 : x, z + i); if (lots.GetLength(0) > lotIndex.x && lots.GetLength(1) > lotIndex.y) { ILot neighboor = lots[(int)lotIndex.x, (int)lotIndex.y]; if (neighboor.lotType == LotType.Lot && ((Lot)neighboor).neighboor == null) { ((Lot)neighboor).neighboor = thisLot; GenerateApple(lots, (int)lotIndex.x, (int)lotIndex.y, apple); } } } }
/* * 26/10/17: Por si nos sirve para el input. * * public void Input_Generate() * { * Destroy(container); * container = null; * GC.Collect(); * GenerateMap(); * } * * public void Input_Draw() * { * DrawNeighboor(); * } * * public void Input_SetActive() * { * container.SetActive(!container.activeSelf); * } */ private void DrawNeighboor() { for (int x = 0; x < map.GetLength(0); x++) { for (int z = 0; z < map.GetLength(1); z++) { ILot ilot = map[x, z]; if (ilot.lotType == LotType.Lot) { Lot lot = ((Lot)ilot); if (lot.neighboor != null) { Vector3 thisPos = lot.worldPos; Vector3 neighboorPos = ((Lot)lot).neighboor.worldPos; Debug.DrawLine(thisPos, neighboorPos, Color.red); } } } } }
/// <summary> /// </summary> /// <param name="lot"/> /// <param name="task"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public LoadInfo CREATE_LOAD_INFO0(ILot lot, Step task, ref bool handled, LoadInfo prevReturnValue) { try { MicronBEAssyPlanInfo plan = new MicronBEAssyPlanInfo(); MicronBEAssyBELot beLot = lot as MicronBEAssyBELot; plan.Init(task); plan.LotID = lot.LotID; plan.UnitQty = lot.UnitQty; plan.ProductID = beLot.Product.ProductID; plan.ProcessID = beLot.Process.ProcessID; return(plan); } catch (Exception e) { WriteHelper.WriteErrorHistory(ErrorLevel.FATAL, string.Format("ErrorMessage : {0} MethodName : {1}", e.Message, System.Reflection.MethodInfo.GetCurrentMethod().Name)); return(default(LoadInfo)); } }
private void InstantiateGridElements(ILot[,] lots) { container.transform.position = Vector3.zero; for (int x = 0; x < lots.GetLength(0); x++) { for (int z = 0; z < lots.GetLength(1); z++) { ILot lot = lots[x, z]; GameObject lotGo; if (lot.lotType == LotType.Street) { lotGo = Instantiate(lot.buildings[0], lot.worldPos, lot.buildings[0].transform.rotation); } else { lotGo = Instantiate(lot.buildings[Random.Range(0, lot.buildings.Length - 1)], lot.worldPos, Quaternion.identity); } lotGo.transform.SetParent(container.transform); } } }
private ILot[,] GenerateGrid() { ILot[,] grid = new ILot[mapWidth, mapHeight]; // build streets int x = 0; for (int n = 0; n < 50; n++) { for (int h = 0; h < mapHeight; h++) { grid[x, h] = new Street(zStreets, new Vector2(x, h)); } x += Random.Range(2, 15); if (x >= mapWidth) { break; } } int z = 0; for (int n = 0; n < 10; n++) { for (int w = 0; w < mapWidth; w++) { if (grid[w, z] != null && grid[w, z].lotType == LotType.Street) { grid[w, z] = new Street(crossRoad, new Vector2(w, z)); } else { grid[w, z] = new Street(xStreets, new Vector2(w, z)); } } z += Random.Range(2, 20); if (z >= mapHeight) { break; } } // get cross streets if (randomStreets) { for (x = 0; x < grid.GetLength(0); x++) { for (z = 0; z < grid.GetLength(1); z++) { if ((grid[x, z] != null && grid[x, z].lotType == LotType.Street) && canBuildRandomStreet(grid, x, z) && Random.Range(0, 10) > 8) { while ((++z < grid.GetLength(1)) && (grid[x, z] == null || grid[x, z].lotType != LotType.Street)) { grid[x, z] = new Street(xStreets, new Vector2(x, z)); } } } } } // add buildings float perlinSeed = Random.Range(0f, 40f); for (int h = 0; h < mapHeight; h++) { for (int w = 0; w < mapWidth; w++) { if (grid[w, h] == null || grid[w, h].lotType != LotType.Street) { float perlin = Mathf.PerlinNoise(w / 10f + perlinSeed, h / 10f + perlinSeed) * 10; grid[w, h] = new Lot(new Vector2(w, h), GetNeighborhoodFromNoise(perlin)); } grid[w, h].worldPos = new Vector3(w * buildingFootprint, 0, h * buildingFootprint); } } return(grid); }
public Transaction(ILot owner, DateTime transactionDate, Int16 rowCount, Int16 columnCount, Int16 codeLength) { this._owner = owner; this._transactionDate = transactionDate; this._verfication = new CodeCard(this, rowCount, columnCount, codeLength); }
public void addLot(ILot newLot) { }
public LotDTO(ILot lot) : base(lot) { }
public Lot(ILot lot) : base(lot) { }
/// <summary> /// </summary> /// <param name="lot"/> /// <param name="handled"/> /// <param name="prevReturnValue"/> /// <returns/> public double GET_FORWARD_PEGGING_QTY0(ILot lot, ref bool handled, double prevReturnValue) { var slot = lot as FabLot; return(slot.UnitQty); }