mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-13 08:00:56 -08:00
21 lines
562 B
C#
21 lines
562 B
C#
using System.Text;
|
|
using BugGame.Parts;
|
|
using BugGame.Resources;
|
|
|
|
namespace BugGame;
|
|
|
|
internal class Bug
|
|
{
|
|
private readonly Body _body = new();
|
|
|
|
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();
|
|
}
|
|
} |