文件名称:Peg-solitaire-CppDFS
介绍说明--下载内容均来自于网络,请自行研究使用
Peg solitaire is a classical puzzle commonly played on a 33-hole cross-shaped board (also called "the English Board") or a 15-hole triangular board.
A valid move is to jump a peg orthogonally over an adjacent peg into a hole two positions away and then to remove the jumped peg.
In the diagrams which follow, · indicates a peg in a hole, * emboldened indicates the peg to be moved, and o indicates an empty hole. A blue ¤ is the hole the current peg moved from a red * is the final position of that peg, a red o is the hole of the peg that was jumped and removed.
规则如上所述,输入txt文件作为初始棋盘,“。”为空棋格,“0"为有棋子的棋格。读入后输出结果
采用DFS算法-Peg solitaire is a classical puzzle commonly played on a 33-hole cross-shaped board (also called " the English Board" ) or a 15-hole triangular board. A valid move is to jump a peg orthogonally over an adjacent peg into a hole two positions away and then to remove the jumped peg. In the diagrams which follow, indicates a peg in a hole,* emboldened indicates the peg to be moved, and o indicates an empty hole. A blue is the hole the current peg moved from a red* is the final position of that peg, a red o is the hole of the peg that was jumped and removed. rules described above, the initial input board txt file, " ." empty chess " 0 " as a pawn in chess. After reading the results using the DFS algorithm output
A valid move is to jump a peg orthogonally over an adjacent peg into a hole two positions away and then to remove the jumped peg.
In the diagrams which follow, · indicates a peg in a hole, * emboldened indicates the peg to be moved, and o indicates an empty hole. A blue ¤ is the hole the current peg moved from a red * is the final position of that peg, a red o is the hole of the peg that was jumped and removed.
规则如上所述,输入txt文件作为初始棋盘,“。”为空棋格,“0"为有棋子的棋格。读入后输出结果
采用DFS算法-Peg solitaire is a classical puzzle commonly played on a 33-hole cross-shaped board (also called " the English Board" ) or a 15-hole triangular board. A valid move is to jump a peg orthogonally over an adjacent peg into a hole two positions away and then to remove the jumped peg. In the diagrams which follow, indicates a peg in a hole,* emboldened indicates the peg to be moved, and o indicates an empty hole. A blue is the hole the current peg moved from a red* is the final position of that peg, a red o is the hole of the peg that was jumped and removed. rules described above, the initial input board txt file, " ." empty chess " 0 " as a pawn in chess. After reading the results using the DFS algorithm output
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Peg solitaire CppDFS.cpp