public void UpgradeOffice() { OfficeRoom office = PlayerRooms.GetOfficeRoom(); if (office.CanBeUpgraded()) { int currentTier = PlayerRooms.GetOfficeRoomTier(); if (office.GetDevResourceQuantityAtTier(currentTier + 1).HasInInventory()) { PlayerRooms.SetOfficeRoomTier(currentTier + 1); office.GetDevResourceQuantityAtTier(currentTier + 1).SubtractFromInventory(); ShopCanvas.TriggerRoomsInfoUpdate(); } else { Debug.Log("Insufficient Resources:" + office.GetDevResourceQuantityAtTier(currentTier + 1)); } } else { Debug.Log("Max Tier Reached: OFFICE "); } }
public static void SetOfficeRoom(OfficeRoom room) { officeRoom = room; }
public IAppointmentFactory WithOfficeRoom(int number, OfficeRoomType officeRoomType) { this.officeRoom = new OfficeRoom(false, number, officeRoomType); return(this); }
public void MoveAndClean_adds_current_tile_to_cleaned_tiles(Direction direction, [Frozen] int size, OfficeRoom sut) { var currentPosition = GetPositionOnBoundary(direction, size); Assume.That(sut.CleanedTiles, Is.Empty); sut.MoveAndClean(currentPosition, direction); Assert.That(sut.CleanedTiles, Contains.Item(currentPosition)); }
public void MoveAndClean_returns_next_tile(Direction direction, int expectedXdelta, int expectedYdelta, OfficeRoom sut) { var currentPosition = new Tile(0, 0); var newPosition = sut.MoveAndClean(currentPosition, direction); Assert.That(newPosition.X, Is.EqualTo(currentPosition.X + expectedXdelta)); Assert.That(newPosition.Y, Is.EqualTo(currentPosition.Y + expectedYdelta)); }
public void Room_is_created_with_no_cleaned_tiles(OfficeRoom sut) { Assert.That(sut.CleanedTiles, Is.Empty); }