using System.Collections.Generic;
using System.Xml;

namespace TeslaConsole.RedPlanet;

public class DeathRaceScenario : Scenario
{
	private Dictionary<string, string> mColors = new Dictionary<string, string>();

	private Dictionary<string, string> mBadges = new Dictionary<string, string>();

	public Dictionary<string, string> Colors => mColors;

	public Dictionary<string, string> Badges => mBadges;

	internal DeathRaceScenario(XmlNode scenarioNode)
		: base(scenarioNode)
	{
		foreach (XmlNode childNode in scenarioNode.ChildNodes)
		{
			switch (childNode.Name)
			{
			case "color":
				RPConfig.AddKeyNameNode(childNode, mColors);
				break;
			case "badge":
				RPConfig.AddKeyNameNode(childNode, mBadges);
				break;
			}
		}
	}
}
