棋盘树形图

棋盘树形图

我想绘制棋盘树形图,并试图找到创建树形图部分的最佳方法。到目前为止,我有下面的图,但看起来棋盘有一个白色边框,切断了分支。这对于棋盘的下部来说不是问题,因为那里本来就有文字,但理想情况下希望分支在棋盘之前完成。

我可以做些什么\tikz来让分支在棋盘前相遇?如果没有,\tikz那么哪些合适的包可以产生相同的效果?

任何帮助都将不胜感激!提前致谢!

在此处输入图片描述

\documentclass{article}

\usepackage{chessboard}
\storechessboardstyle{3x3}{maxfield=c3}

\usepackage{tikz}

\begin{document}


\centering


\begin{tikzpicture}[
        level 1/.style={sibling distance=5.5cm,},
        level 2/.style={sibling distance=3.5cm},
        level distance=5cm,
        line width=2,]
\node {\chessboard[style=3x3,mover=b,addblack={pa3,pb3,pc2},addwhite={pa2,pb2,pc1},showmover=true,]}
    child {  node {\chessboard[style=3x3,mover=w,addblack={pb2,pb3,pc2},addwhite={pa2,pc1},showmover=true,]}
        child {  node {\chessboard[style=3x3,mover=w,addblack={pa3,pa2,pc2},addwhite={pb2,pc1},showmover=true,]}}
        child {  node {\chessboard[style=3x3,mover=w,addblack={pa3,pa2,pc2},addwhite={pb2,pc1},showmover=true,]}
            child {  node {\chessboard[style=3x3,mover=w,addblack={pa3,pa2,pc2},addwhite={pb2,pc1},showmover=true,]}}}}
    child {  node {\chessboard[style=3x3,mover=w,addblack={pa3,pa2,pc2},addwhite={pb2,pc1},showmover=true,]}
        child {  node {\chessboard[style=3x3,mover=w,addblack={pa3,pa2,pc2},addwhite={pb2,pc1},showmover=true,]}
            child {  node {\chessboard[style=3x3,mover=w,addblack={pa3,pa2,pc2},addwhite={pb2,pc1},showmover=true,]}
                child {  node {\chessboard[style=3x3,mover=w,addblack={pa3,pa2,pc2},addwhite={pb2,pc1},showmover=true,]}}}}};
\end{tikzpicture}

\end{document}

相关内容