Initial commit
This commit is contained in:
commit
593d8ebfea
30 changed files with 2206 additions and 0 deletions
54
BucketChain/Well.cs
Normal file
54
BucketChain/Well.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
namespace BucketChain;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a well which provides water for fighting the fire.
|
||||
/// </summary>
|
||||
public sealed class Well
|
||||
{
|
||||
// TODO
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new well with the supplied properties.
|
||||
/// Initially the well is filled to the brim.
|
||||
/// </summary>
|
||||
/// <param name="maxCapacity">The max. fill level of the well in liters.</param>
|
||||
/// <param name="refillRate">The amount of liters by which this well is refilled each (chain)
|
||||
/// operation step</param>
|
||||
public Well(double maxCapacity, double refillRate)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets how many liters currently remain in the well.
|
||||
/// Cannot exceed the max. capacity of the well or drop below 0.
|
||||
/// </summary>
|
||||
// TODO
|
||||
// public double LitersRemaining ...
|
||||
|
||||
/// <summary>
|
||||
/// Refills the well by the constant rate.
|
||||
/// </summary>
|
||||
public void Refill()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fills the passed bucket.
|
||||
/// Can provide at most the <see cref="LitersRemaining"/> and only subtracts the
|
||||
/// amount actually required to fill the bucket.
|
||||
/// </summary>
|
||||
/// <param name="bucket">The bucket to fill</param>
|
||||
public void FillBucket(Bucket bucket)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a string representation of this well.
|
||||
/// Shows the current and max. amount of liters - rounded to whole numbers.
|
||||
/// </summary>
|
||||
/// <returns>String representation of the well</returns>
|
||||
public override string ToString() => string.Empty; // TODO
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue