ex-col-03-santa/SantaClausInc/Core/Sleigh.cs
MarcUs7i d3e489b99c Done with List&Stack
Added TargetCity and initialized it by the constructor in Sleigh.cs
2024-12-19 16:32:46 +01:00

49 lines
1.7 KiB
C#

namespace SantaClausInc.Core;
/// <summary>
/// Represents a reindeer powered sleigh operated by a Santa clone.
/// Contains the piles of presents to be distributed to the good children of a city.
/// </summary>
public sealed class Sleigh
{
// TODO
/// <summary>
/// Creates a new <see cref="Sleigh" /> instance with the given capacity and target city
/// </summary>
/// <param name="capacity">Max. amount of parcel piles that can be loaded on this sleigh</param>
/// <param name="targetCity">City this sleigh will go to during the delivery tour</param>
public Sleigh(int capacity, string targetCity)
{
TargetCity = targetCity;
// TODO
}
/// <summary>
/// Gets the target city of this sleigh
/// </summary>
public string TargetCity { get; }
/// <summary>
/// Loads a pile of <see cref="Parcel" /> on the sleigh.
/// Piles loaded first can only be retrieved once those loaded last have been unloaded.
/// </summary>
/// <param name="parcelPile">Pile of presents to add</param>
/// <returns>True if the pile could be loaded; false if there is no more room available</returns>
public bool Load(Stack<Parcel> parcelPile)
{
// TODO
return false;
}
/// <summary>
/// Executes the delivery tour and creates a log of each step while doing so.
/// Presents are unloaded at the proper houses and the sleigh returns back to base once done.
/// </summary>
/// <returns>List of chronological log entries of the delivery tour</returns>
public List<string> ExecuteTour()
{
// TODO
return null!;
}
}