Exemple #1
0
 // Will be create indirectly from a CheckersGame object via BeginMove
 internal CheckersMove(CheckersGame game, CheckersPiece piece, bool makeReadOnlyCopy)
 {
     this.game       = game;
     this.piece      = piece;
     initialGame     = (((makeReadOnlyCopy) && (!game.IsReadOnly)) ? (CheckersGame.MakeReadOnly(game)) : (game));
     initialPiece    = initialGame.Pieces[Array.IndexOf(game.Pieces, piece)];
     board           = (CheckersPiece[, ])game.Board.Clone();
     currentLocation = piece.Location;
     jumped          = new ArrayList();
     path            = new ArrayList();
     cannotMove      = false;
     kinged          = false;
 }