Mercurial > repos > snowblizz-super-API-ideas
comparison API/Factories/Requirement/UnitRequiresAtLeastNUnitsRequirementFactory.cs @ 372:2f8b2467ba99
Re #351: Add extensible requirement handling method
* Pass unit test (assumes units are already loaded)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 14 Jun 2011 13:58:16 +0000 |
parents | bfdb95906075 |
children | e10630f39ec2 |
comparison
equal
deleted
inserted
replaced
371:bfdb95906075 | 372:2f8b2467ba99 |
---|---|
15 } | 15 } |
16 | 16 |
17 public UnitRequiresAtLeastNUnitsRequirement CreateRequirement (UnitType type, string data) | 17 public UnitRequiresAtLeastNUnitsRequirement CreateRequirement (UnitType type, string data) |
18 { | 18 { |
19 UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(type); | 19 UnitRequiresAtLeastNUnitsRequirement req = new UnitRequiresAtLeastNUnitsRequirement(type); |
20 req.AddUnitTypeRequirement(type.Race.GetUnitType(data)); | |
20 return req; | 21 return req; |
21 } | 22 } |
22 } | 23 } |
23 } | 24 } |
24 | 25 |