using System;
using System.Text;

namespace TeslaConsole.BattleTech;

[Serializable]
internal abstract class BTParticipant
{
	private readonly string mPodHostAddress;

	private readonly HostType mHostType;

	public string PodHostAddress => mPodHostAddress;

	public HostType HostType => mHostType;

	protected BTParticipant(string podHostAddress, HostType hostType)
	{
		mPodHostAddress = podHostAddress;
		mHostType = hostType;
	}

	public void AppendParticipant(int index, StringBuilder sb)
	{
		sb.AppendFormat("[{0}]\n", mPodHostAddress);
		sb.AppendFormat("hostType={0}\n", (int)mHostType);
		AppendParticipantSpecificData(index, sb);
	}

	protected abstract void AppendParticipantSpecificData(int index, StringBuilder sb);
}
