예제 #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();
        }
예제 #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();
        }
예제 #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();
 }
예제 #4
0
 public TestGame(RulesBase rules)
     : base(rules)
 {
     generation = 0;
 }