git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1126 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
chrisf
2007-07-07 05:15:52 +00:00
parent 04c0387e46
commit 29fb75c486
2 changed files with 20 additions and 2 deletions

View File

@@ -71,5 +71,23 @@ namespace OpenRa.TechTreeTest
{
this.friendlyName = friendlyName;
}
public bool ShouldMakeBuildable(IEnumerable<string> buildings)
{
List<string> p = new List<string>(prerequisites);
foreach (string b in buildings)
p.Remove(b);
return p.Count == 0;
}
public bool ShouldMakeUnbuildable(IEnumerable<string> buildings)
{
List<string> p = new List<string>(prerequisites);
foreach (string b in buildings)
p.Remove(b);
return p.Count == prerequisites.Length;
}
}
}