annotate api/Objects/Category.cs @ 12:ac232763858b

Re #9 - Make WarFoundry API use smaller methods * Obselete old Category and UnitType constructors and add minimal constructors * Add setters to properties where needed * Add value sanity checking to Category and UnitType * Set default values for percentages, choices and points for Category * Make XML factory use new constructor and setter properties * Add DuplicateItemException to project file
author IBBoard <dev@ibboard.co.uk>
date Sun, 18 Jan 2009 20:52:29 +0000
parents 613bc5eaac59
children 306558904c2a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 using System;
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 using System.Xml;
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
3 using IBBoard.Logging;
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 namespace IBBoard.WarFoundry.API.Objects
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 /// <summary>
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 /// Summary description for Category.
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 /// </summary>
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 public class Category : WarFoundryObject
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 {
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
12 private int minPts = 0;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
13 private int maxPts = -1;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
14 private int minPc = 0;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
15 private int maxPc = 100;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
16 private int minChoice = 0;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
17 private int maxChoice = -1;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
18 private int baseVal = 0;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
19 private int incVal = 0;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
20 private int incAmount = 0;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
21
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
22
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
23 public Category(string id, string name) : base(id, name)
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
24 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
25 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
26
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
27 [Obsolete("Use the two argument constructor and the appropriate 'set' methods")]
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 public Category(string id, string name, int minPoints, int maxPoints, int minPercent, int maxPercent, int minChoices, int maxChoices, int baseValue, int incrementValue, int incrementAmount) : base(id, name)
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 {
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
30 MinimumPoints = minPoints;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
31 MaximumPoints = maxPoints;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
32 MinimumPercentage = minPercent;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
33 MaximumPercentage = maxPercent;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
34 BaseValue = baseValue;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
35 IncrementValue = incrementValue;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
36 IncrementAmount = incrementAmount;
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39 protected override string DefaultName()
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 return "";
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 public int MinimumPoints
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 get { return minPts; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
47 set
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
48 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
49 minPts = (value >= 0 ? value : 0);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
50 CheckMinimumPoints();
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
51 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 public int MaximumPoints
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 get { return maxPts; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
57 set
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
58 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
59 maxPts = (value >= -1 ? value : -1);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
60 CheckMinimumPoints();
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
61 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
62 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
63
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
64 private void CheckMinimumPoints()
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
65 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
66 if (MinimumPoints > MaximumPoints && MaximumPoints!=-1)
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
67 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
68 MinimumPoints = MaximumPoints;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
69 LogNotifier.WarnFormat(GetType(), "Category {0} ({1}) had a minimum points limit greater than its maximum points limit.", Name, ID);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
70 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
72
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73 public int MinimumPercentage
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
75 get { return minPc; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
76 set
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
77 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
78 minPc = (value >= 0 ? value : 0);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
79 CheckMinimumPercentage();
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
80 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83 public int MaximumPercentage
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85 get { return maxPc; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
86 set
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
87 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
88 if (value < 0)
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
89 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
90 maxPc = 0;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
91 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
92 else if (value > 100)
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
93 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
94 maxPc = 100;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
95 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
96 else
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
97 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
98 maxPc = value;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
99 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
100
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
101 CheckMinimumPercentage();
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
102 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
103 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
104
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
105 private void CheckMinimumPercentage()
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
106 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
107 if (MinimumPercentage > MaximumPercentage)
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
108 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
109 MinimumPercentage = MaximumPercentage;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
110 LogNotifier.WarnFormat(GetType(), "Category {0} ({1}) had a minimum percentage limit greater than its maximum percentage limit.", Name, ID);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
111 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
112 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
113
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
114 public int MinimumChoices
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
115 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
116 get { return minChoice; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
117 set
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
118 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
119 minChoice = (value >= 0 ? value : 0);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
120 CheckMinimumChoices();
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
121 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
122 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
123
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
124 public int MaximumChoices
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
125 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
126 get { return maxChoice; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
127 set
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
128 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
129 maxChoice = (value >= -1 ? value : -1);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
130 CheckMinimumChoices();
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
131 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
132 }
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
133
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
134 private void CheckMinimumChoices()
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
135 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
136 if (MinimumPercentage > MaximumPercentage && MaximumPercentage!=-1)
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
137 {
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
138 MinimumPercentage = MaximumPercentage;
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
139 LogNotifier.WarnFormat(GetType(), "Category {0} ({1}) had a minimum number of choices greater than its maximum number of choices.", Name, ID);
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
140 }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
141 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
142
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
143 public int BaseValue
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
144 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
145 get { return baseVal; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
146 set { baseVal = (value >= 0 ? value : 0); }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
147 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
148
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
149 public int IncrementValue
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
150 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
151 get { return incVal; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
152 set { incVal = (value >= 0 ? value : 0); }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
153 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
154
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
155 public int IncrementAmount
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
156 {
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
157 get { return incAmount; }
12
ac232763858b Re #9 - Make WarFoundry API use smaller methods
IBBoard <dev@ibboard.co.uk>
parents: 8
diff changeset
158 set { incAmount = (value >= 0 ? value : 0); }
0
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
159 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
160 }
520818033bb6 Initial commit of WarFoundry code
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
161 }