Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the GameBase class.
        /// </summary>
        /// <param name="formatter">The object performing game state output.</param>
        /// <param name="rules">The rules to run the game.</param>
        protected GameBase(RulesBase rules)
        {
            if (rules == null)
            {
                throw new ArgumentNullException(paramName: "rules");
            }

            this.rules = rules;
            stopwatch  = new Stopwatch();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the GameBase class.
        /// </summary>
        /// <param name="formatter">The object performing game state output.</param>
        /// <param name="rules">The rules to run the game.</param>
        protected GameBase(RulesBase rules)
        {
            if (rules == null)
            {
                throw new ArgumentNullException(paramName: "rules");
            }

            this.rules = rules;
            stopwatch = new Stopwatch();
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the LinqGame class.
 /// </summary>
 /// <param name="formatter">The formatter to output state by.</param>
 /// <param name="rules">The rules for running the game.</param>
 public LinqGame(RulesBase rules)
     : base(rules)
 {
     generation = 0;
     universe = new Universe();
 }
Ejemplo n.º 4
0
 public TestGame(RulesBase rules)
     : base(rules)
 {
     generation = 0;
 }