Exemplo n.º 1
0
 /// <summary>Performs a comparison of two <see cref="Turn"/> objects
 /// and returns a value indicating whether one is less than, equal to or greater than the other.
 /// </summary>
 /// <param name="t1">The first <see cref="Turn"/>.</param>
 /// <param name="t2">The second <see cref="Turn"/>.</param>
 /// <returns>
 /// <para>A signed number indicating the relative values of <paramref>t1</paramref> and <paramref>t2</paramref></para>.
 /// <para>If <paramref>t1</paramref> is less than <paramref>t2</paramref>, the return value will be less than zero.</para>
 /// <para>If <paramref>t1</paramref> is equal to <paramref>t2</paramref>, the return value will be zero.</para>
 /// <para>If <paramref>t1</paramref> is greater than <paramref>t2</paramref>, the return value will greater than zero.</para>
 /// </returns>
 public static int Compare(Turn t1, Turn t2)
 {
     if (t1 == t2)
     {
         return 0;
     }
     if (t1 < t2)
     {
         return -1;
     }
     return 1;
 }
Exemplo n.º 2
0
 /// <summary>Creates a new <see cref="Game"/> instance.
 /// </summary>
 public Game()
 {
     this.map = new Map();
     this.powers = new Dictionary<string, Power>();
     this.turn = new Turn(Phase.Spring, 1901);
 }