Add printing of bugs

This commit is contained in:
Andrew Cooper
2022-07-13 08:04:35 +10:00
parent be9f0a92f8
commit 04ec0f8f47
10 changed files with 72 additions and 5 deletions

View File

@@ -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();
}
}