view API/Factories/Requirement/UnitRequiresAtLeastNUnitsRequirementFactory.cs @ 371:bfdb95906075

Re #351: Add extensible requirement handling method * First refactor of extensible requirement creation * Needs to return different types of factory * Needs to handle unit types that are currently not loaded
author IBBoard <dev@ibboard.co.uk>
date Mon, 13 Jun 2011 19:44:39 +0000
parents
children 2f8b2467ba99
line wrap: on
line source

// This file (UnitRequiresAtLeastNUnitsRequirementFactory.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2011 IBBoard
// 
// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
using System;
using IBBoard.WarFoundry.API.Objects;
using IBBoard.WarFoundry.API.Objects.Requirement;

namespace IBBoard.WarFoundry.API.Factories.Requirement
{
	public class UnitRequiresAtLeastNUnitsRequirementFactory
	{
		public UnitRequiresAtLeastNUnitsRequirementFactory()
		{
			//Do nothing special
		}

		public UnitRequiresAtLeastNUnitsRequirement CreateRequirement (UnitType type, string data)
		{
			UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(type);
			return req;
		}
	}
}