Initial commit
This commit is contained in:
commit
593d8ebfea
30 changed files with 2206 additions and 0 deletions
46
BucketChain/Bucket.cs
Normal file
46
BucketChain/Bucket.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
namespace BucketChain;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a bucket used to transport water.
|
||||
/// </summary>
|
||||
public sealed class Bucket
|
||||
{
|
||||
// TODO
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new bucket with the given capacity.
|
||||
/// </summary>
|
||||
/// <param name="capacityLiters">Bucket capacity in liters</param>
|
||||
public Bucket(double capacityLiters)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets if this bucket is currently completely empty or not.
|
||||
/// </summary>
|
||||
public bool IsEmpty => false; // TODO
|
||||
|
||||
/// <summary>
|
||||
/// Fills the bucket to the brim if enough water is available.
|
||||
/// If there is not enough water to fill the bucket completely it takes as much as possible.
|
||||
/// If the bucket is already full no water is taken.
|
||||
/// </summary>
|
||||
/// <param name="maxAvailable">Max. available water, in liters</param>
|
||||
/// <returns>The amount taken for filling the bucket</returns>
|
||||
public double Fill(double maxAvailable)
|
||||
{
|
||||
// TODO
|
||||
return -1D;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Empties the bucket. The amount stored within before emptying is returned.
|
||||
/// </summary>
|
||||
/// <returns>Amount emptied from the bucket, in liters</returns>
|
||||
public double Empty()
|
||||
{
|
||||
// TODO
|
||||
return -1D;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue