/// <summary> /// Tries to infiltrate an enemy facility. /// </summary> /// <param name="facility">The facility to infiltrate.</param> /// <returns>Returns true if the agent successfully infiltrated the facility, otherwise false.</returns> public async Task <bool> InfiltrateAsync(EnemyFacility facility) { if (facility == null) { throw new ArgumentNullException(nameof(facility)); } await Task.Delay(World.Current.Random.Next(World.Current.ShortestTask, World.Current.LongestTask)); var success = World.Current.Random.NextBoolean(); if (success) { CurrentAssignment = facility; } return(success); }
internal TopSecretDocument(EnemyFacility facility) { Facility = facility ?? throw new ArgumentNullException(nameof(facility)); Location = DocumentLocation.AtEnemyFacility; }