mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 23:26:40 -08:00
Add printing of bugs
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Text;
|
||||
using BugGame.Parts;
|
||||
using BugGame.Resources;
|
||||
|
||||
@@ -10,4 +11,11 @@ internal class Bug
|
||||
public bool IsComplete => _body.IsComplete;
|
||||
|
||||
public bool TryAdd(IPart part, out Message message) => _body.TryAdd(part, out message);
|
||||
|
||||
public string ToString(string pronoun, char feelerCharacter)
|
||||
{
|
||||
var builder = new StringBuilder($"*****{pronoun} Bug*****").AppendLine().AppendLine().AppendLine();
|
||||
_body.AppendTo(builder, feelerCharacter);
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user