文件名称:Peg-solitaire-CppDFS
-
所属分类:
- 标签属性:
- 上传时间:2013-11-02
-
文件大小:2.28kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.