- 13
- 0
- 约7.28千字
- 约 8页
- 2017-02-13 发布于江苏
- 举报
Xiangqi
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2393 Accepted Submission(s): 576
Problem Description
Xiangqi is one of the most popular two-player board games in China. The game represents a battle between two armies with the goal of capturing the enemy’s “general” piece. In this problem, you are given a situation of later stage in the game. Besides, the red side has already “delivered a check”. Your work is to check whether the situation is “checkmate”.Now we introduce some basic rules of Xiangqi. Xiangqi is played on a 10×9 board and the pieces are placed on the intersections (points). The top left point is (1,1) and the bottom right point is (10,9). There are two groups of pieces marked by black or red Chinese characters, belonging to the two players separately. During the game, each player in turn moves one piece from the point it occupies to another point. No two pieces can occupy the same point at the same time. A piece can be moved onto a point occupied by an enemy piece, in which case the enemy piece is captured and removed from the board. When the general is in danger of being captured by the enemy player on the enemy player’s next move, the enemy player is said to have delivered a check. If the generals player can make no move to prevent the generals capture by next enemy move, the situation is called “checkmate”.
We only use 4 kinds of pieces introducing as follows:General: the generals can move and capture one point either vertically or horizontally and cannot leave the “palace” unless the situation called “flying general” (see the figure above). “Flying general” means that one general can “fly” across the board to capture the enemy general if they stand on the same line without intervening pieces.Chariot: the chariots can move and capture vertically and horizontally by any distance, but may not jump over intervening piecesCannon: the cannons move like the chariots, horizontall
您可能关注的文档
最近下载
- 2025年江苏城乡建设职业学院单招职业技能测试题库(含答案).docx VIP
- 防治大气污染课件.pptx VIP
- 门德尔松《无词歌》艺术特征与演奏技巧研究--以Op.67为例.pdf
- 第1课《我们的生活越来越幸福》教案-2025-2026学年第二学期三年级道德与法治统编版下册.docx
- 广西珊瑚钨锡矿床矿化特征及钨矿物研究.pdf VIP
- HGT 3268-2002 工业用三乙醇胺化工标准.PDF VIP
- (高清版)B 15763.4-2009 建筑用安全玻璃 第4部分:均质钢化玻璃.pdf VIP
- 某人民法院审判大楼暖通及空调设计.pdf VIP
- 最新!《中华人民共和国噪声污染防治法》全文来了 .pdf VIP
- 小学生疾病预防安全教育教案.pptx VIP
原创力文档

文档评论(0)