comparison api/Objects/UnitType.cs @ 61:3c77722a02b5

Re #61 - Complete structure of WarFoundry API objects * Add containership support to Unit class * Add method to UnitType to check if a UnitType is of an allowed type
author IBBoard <dev@ibboard.co.uk>
date Thu, 09 Apr 2009 14:17:53 +0000
parents e0ce5578e7c2
children 2094bd0ba652
comparison
equal deleted inserted replaced
60:0c3500fca49d 61:3c77722a02b5
357 public void AddNote(string note) 357 public void AddNote(string note)
358 { 358 {
359 notes.Add(note); 359 notes.Add(note);
360 } 360 }
361 361
362 public bool CanContainUnit(Unit unit)
363 {
364 return CanContainUnitType(unit.UnitType);
365 }
366
367 public bool CanContainUnitType(UnitType unitType)
368 {
369 return containedTypes.Contains(unitType);
370 }
371
362 public UnitType[] ContainedUnitTypes 372 public UnitType[] ContainedUnitTypes
363 { 373 {
364 get { return containedTypes.ToArray(); } 374 get { return containedTypes.ToArray(); }
365 } 375 }
366 376