annotate api/Requirements/UnitRequirementItem.cs @ 309:7e1b27843b0d

Fixes #99: Define "points" values in GameSystem * Implement fall-back in case only one value has been set
author IBBoard <dev@ibboard.co.uk>
date Sun, 20 Feb 2011 16:00:11 +0000
parents 2f3cafb69799
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104
2f3cafb69799 Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents: 82
diff changeset
1 // This file (UnitRequirementItem.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2008, 2009 IBBoard.
15
306558904c2a Re #1 - LGPL license all code
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
2 //
104
2f3cafb69799 Re #121: Migrate to AGPL license
IBBoard <dev@ibboard.co.uk>
parents: 82
diff changeset
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.
15
306558904c2a Re #1 - LGPL license all code
IBBoard <dev@ibboard.co.uk>
parents: 0
diff changeset
4
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 using System;
82
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
6 using IBBoard.WarFoundry.API.Objects;
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
7
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
8 namespace IBBoard.WarFoundry.API.Requirements
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
9 {
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
10 /// <summary>
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
11 /// Summary description for UnitRequirementItem.
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
12 /// </summary>
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
13 public class UnitRequirementItem
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
14 {
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
15 private UnitType type;
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
16 private int requiredNum;
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
17
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
18 public UnitRequirementItem(UnitType unitType, int reqNumber)
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
19 {
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
20 type = unitType;
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
21 requiredNum = reqNumber;
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
22 }
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
23
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
24 public UnitRequirementItem(UnitType type) : this(type, 1) { }
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
25
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
26 public UnitType UnitType
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
27 {
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
28 get { return type; }
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
29 }
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
30
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
31 public int Amount
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
32 {
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
33 get { return requiredNum; }
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
34 }
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
35 }
3ea0ab04352b * Fix line terminators
IBBoard <dev@ibboard.co.uk>
parents: 15
diff changeset
36 }