private void CheckSlotForRefresh(IWorkerSlot slot) { if (slot == SlotToDisplay) { Refresh(); } }
private IHexCell BuildCell(IWorkerSlot slot) { var mockCells = new Mock <IHexCell>(); mockCells.Setup(tile => tile.WorkerSlot).Returns(slot); AllCells.Add(mockCells.Object); return(mockCells.Object); }
/// <inheritdoc/> public YieldSummary GetYieldMultipliersForSlot(IWorkerSlot slot) { if (slot == null) { throw new ArgumentNullException("slot"); } return(YieldSummary.Empty); }
private void AssignAndLockUnoccupiedSlot(IWorkerSlot slot) { if (UnemploymentLogic.GetUnemployedPeopleInCity(ObjectToDisplay) <= 0) { FreeUpSomeSlot(); } slot.IsOccupied = true; slot.IsLocked = true; }
private static YieldSummary GetSlotYield( IWorkerSlot slot, ICity city, IYieldGenerationLogic generationLogic ) { if (slot.ParentCell != null) { return(generationLogic.GetYieldOfCellForCity(slot.ParentCell, city)); } else { return(generationLogic.GetYieldOfBuildingSlotsForCity(slot.ParentBuilding, city)); } }
private void OnSlotClicked(IWorkerSlot slot) { if (ObjectToDisplay == null) { return; } if (slot.IsOccupied && !slot.IsLocked) { LockOccupiedSlot(slot); } else if (slot.IsOccupied && slot.IsLocked) { UnassignLockedSlot(slot); } else { AssignAndLockUnoccupiedSlot(slot); } ObjectToDisplay.PerformDistribution(); }
private void UnassignLockedSlot(IWorkerSlot slot) { slot.IsOccupied = false; slot.IsLocked = false; }
private void LockOccupiedSlot(IWorkerSlot slot) { slot.IsLocked = true; }