Added ToString implementation
This commit is contained in:
parent
1c5a634afb
commit
245ba9b6a6
1 changed files with 10 additions and 2 deletions
|
|
@ -59,7 +59,15 @@ public sealed class Chain
|
|||
/// <returns>String representation of the bucket chain</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
// TODO
|
||||
return string.Empty;
|
||||
string result = $"{_well} | ";
|
||||
Person? currentPerson = _firstPerson;
|
||||
for (int i = 0; i < _requiredPeople; i++)
|
||||
{
|
||||
result += $"{currentPerson?.ToString() ?? "\u2754"} | ";
|
||||
currentPerson = currentPerson?.RightNeighbor;
|
||||
}
|
||||
|
||||
result += $"{_fire}";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue