/// <summary>Creates a shallow copy of the CheckersPieceCollection.</summary>
        public CheckersPieceCollection Clone()
        {
            CheckersPieceCollection clone = new CheckersPieceCollection();

            clone.AddRange(ToArray());
            return(clone);
        }
Example #2
0
        public CheckersGame(bool optionalJumping)
        {
            // Game rules
            this.optionalJumping = optionalJumping;

            // Initialize variables
            isReadOnly = false;
            pieces     = new CheckersPieceCollection();
            board      = new CheckersPiece[BoardSize.Width, BoardSize.Height];
            firstMove  = 1;
            Stop();
        }
Example #3
0
        public CheckersGame(bool optionalJumping)
        {
            // Game rules
            this.optionalJumping = optionalJumping;

            // Initialize variables
            isReadOnly = false;
            pieces = new CheckersPieceCollection();
            board = new CheckersPiece[BoardSize.Width, BoardSize.Height];
            firstMove = 1;
            Stop();
        }
 /// <summary>Creates a shallow copy of the CheckersPieceCollection.</summary>
 public CheckersPieceCollection Clone()
 {
     CheckersPieceCollection clone = new CheckersPieceCollection();
     clone.AddRange(ToArray());
     return clone;
 }