public Piece(Piece piece) { Position = new Position(piece.Position); Color = piece.Color; }
public AIBoardNode(Piece piece) { Color = piece.Color; Row = piece.Position.Row; Column = piece.Position.Column; }
public bool IsCorner(Piece piece) { bool isCorner = false; int rows = (Tiles.Contains(piece)) ? TileRows : PegRows; if ((piece.Position.Row == 0 && piece.Position.Column == 0) || (piece.Position.Row == 0 && piece.Position.Column == rows - 1) || (piece.Position.Row == rows - 1 && piece.Position.Column == 0) || (piece.Position.Row == rows - 1 && piece.Position.Column == rows - 1) ) { isCorner = true; } return isCorner; }