347
|
1 // This file (Requirement.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2011 IBBoard
|
|
2 //
|
|
3 // 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.
|
|
4 using System;
|
|
5
|
|
6 namespace IBBoard.WarFoundry.API.Objects.Requirement
|
|
7 {
|
|
8 /// <summary>
|
|
9 /// Base interface for a Requirement that constrains the units/equipment that can be taken in an army
|
|
10 /// </summary>
|
|
11 public interface IRequirement
|
|
12 {
|
|
13 /// <summary>
|
|
14 /// Checks whether the supplied WarFoundryObject can be added to the supplied army.
|
|
15 /// </summary>
|
|
16 /// <returns>
|
|
17 /// A <code>Validation</code> enum to show the result of the validation
|
|
18 /// </returns>
|
|
19 /// <param name='wfObject'>
|
|
20 /// The object that we want to add. This may be involved in the check, or it may not affect the evaluation of the requirement
|
|
21 /// </param>
|
|
22 /// <param name='toArmy'>
|
|
23 /// The army to add the object to.
|
|
24 /// </param>
|
|
25 Validation AllowsAdding(WarFoundryObject wfObject, Army toArmy);
|
|
26
|
|
27 /// <summary>
|
|
28 /// Checks whether the supplied army is currently valid according to this requirement.
|
|
29 /// </summary>
|
|
30 /// <returns>
|
|
31 /// A <code>Validation</code> enum to show the result of the validation
|
|
32 /// </returns>
|
|
33 /// <param name='toValidate'>
|
|
34 /// The army to validate
|
|
35 /// </param>
|
|
36 Validation ValidatesArmy(Army army);
|
|
37 }
|
|
38 }
|
|
39
|