private CPiece(Int32 id, ImageSource source, CMovementValidator movementValidator, EPieceColor pieceColor, CTile tile) { Source = source; _movementValidator = movementValidator; Color = pieceColor; IsActive = true; Id = id; Width = PieceSize; Height = PieceSize; Margin = new Thickness(tile.X * PieceSize, tile.Y * PieceSize, 0, 0); AllowDrop = true; }
public void TransformToQueen() { _movementValidator = SMovementValidatorFactory.GetMovementValidator(EPieceType.Queen); Source = new BitmapImage(new Uri($"/Images/{Color}/Queen.png", UriKind.RelativeOrAbsolute)); }