Пример #1
0
        /// <summary>
        /// Initializes a fresh turn object, also populating the pawns and king objects.
        /// </summary>
        protected Turn(KingSurvivalEngine engine)
        {
            this.turnCount = 0;
            this.Pawns     = new List <Figure>();
            this.KingWon   = false;
            this.Engine    = engine;

            // Calls the factory to initialize starting pawns and king figures.
            this.InitializeFigures();
        }
Пример #2
0
 /// <summary>
 /// Used when initializing a KingTurn when no other turns have existed before it.
 /// </summary>
 /// <param name="engine">The engine that acts as a bridge between the turn engine with the display.</param>
 public KingTurn(KingSurvivalEngine engine)
     : base(engine)
 {
 }
Пример #3
0
 /// <summary>
 /// Used when initializing a PawnTurn when no other turns have existed before it.
 /// </summary>
 /// <param name="engine">The engine that acts as a bridge between the turn engine with the display.</param>
 public PawnTurn(KingSurvivalEngine engine)
     : base(engine)
 {
 }