20 lines
508 B
C#
20 lines
508 B
C#
using Tiger.Communication.Messages.Interfaces;
|
|
using Tiger.Communication.Messages.Types;
|
|
|
|
namespace Tiger.Communication.Messages.Outgoing.Users;
|
|
|
|
public class CreditBalanceComposer : IMessageComposer
|
|
{
|
|
private readonly int _credits;
|
|
|
|
public CreditBalanceComposer(int credits)
|
|
{
|
|
_credits = credits;
|
|
}
|
|
|
|
public OutgoingHeaders Header => OutgoingHeaders.CreditBalanceComposer;
|
|
public void Compose(ServerMessage message)
|
|
{
|
|
message.AppendString($"{_credits}.0");
|
|
}
|
|
} |