using System.Collections.Generic;
using System.Linq;

namespace Wizard;

public class PracticeAISettingDataSet
{
	private List<PracticeAISettingData> _dataTable;

	public PracticeAISettingDataSet()
	{
		_dataTable = new List<PracticeAISettingData>();
	}

	public void AddData(PracticeAISettingData data)
	{
		if (!_dataTable.Any((PracticeAISettingData d) => d.ClassId == data.ClassId && d.Difficulty == data.Difficulty))
		{
			_dataTable.Add(data);
		}
	}

	public PracticeAISettingData GetSettingData(int classId, int difficulty)
	{
		return _dataTable.First((PracticeAISettingData d) => d.ClassId == classId && d.Difficulty == difficulty);
	}

	public List<PracticeAISettingData> GetSettingDataTable()
	{
		return _dataTable;
	}
}
