翻棋游戏介绍

Introduction
        Dark chess uses the original Chinese chess pieces, in total 32 pieces, with 16 RED pieces and 16 BLACK pieces. The details of pieces are shown in Table 1 below. All 32 pieces are initially shuffled and randomly allocated face-down to squares on the board. Note that the pieces are placed inside the squares of the 8×4 grids, rather than on the intersections as in Chinese chess. During a game, two players take turns performing an action each turn.
There are several variations on the Dark chess rules. In this project, we will follow the rules specified in the next section. These rules are similar to the rules of Dark chess in the Tiantian Xiangqi app (天天象棋翻翻棋 ), with an exception that all 32 pieces are face-down initially (while Tiantian Xiangqi has four pieces face-up initially).

Rules:Please strictly follow the rules in this section for your program. If you have any questions about the rules, please ask the instructors immediately.

1. At the beginning, all 32 pieces are shuffled and randomly allocated face-down on the board. Note that the pieces are placed inside the squares of the 8×4 grid, rather than on the intersections as in Chinese chess.

2. The first player turns up a piece to begin the game. The color of that first uncovered piece is the color the first player will play in the game. The second player then makes a move, and the two players alternate until the game is finished.

3. When it is a player's turn, the player can perform three kinds of actions: turn a piece face-up, move a piece, or capture an enemy piece.  Turning over a piece: Turning a piece from face-down to face-up is a legal move if there are any face-down pieces on the board. Once revealed, a piece may move, capture, or be captured.  Moving a piece: A player may only move face-up pieces of their own color. A piece (except Cannon) may move only one square up, down, left, or right. A piece can never move onto a square that is already occupied unless such a move is a legal capture.  Capturing an opposing piece: A player may use a their own face-up piece to capture a face-up piece of the opposing color. In all captures, the captured piece is removed from the board and its square is occupied by the capturing piece. The rules for piece capturing are as follows.  The pieces are ranked, forming a hierarchy with the General at the top and Soldiers at the bottom. The ranking of pieces goes as follows: General>Advisor>Minister>Chariot>Horse>Soldier. Only pieces of equal or lower rank may be captured, with two exceptions: i) General can only be captured by Soldier; ii) Cannon captures in a different way (more details below). Below are some legal and illegal example actions.
☑ [LEGAL] A General captures a Minister. A Soldier captures a General. A Red Horse captures a black Horse (even they have equal rank).
☑ [ILLEGAL] A Minister captures an Advisor.
 All pieces capture exactly as they move: one square up, down, left, or right.
 The Cannon is not included in the ranking because it is exceptional: it captures in an unusual way, it can capture a piece of any rank (including General), and yet is vulnerable to be captured by any piece except the Soldier. A Cannon captures in the same way as in Chinese chess: it needs to jump over exactly one intermediate piece (called a screen) along a single row or column of the board. The color of the screening piece does not matter---it can be the player's own piece or enemy's piece, or even face-down unrevealed piece.
 The Cannon can capture a piece even if the piece is face-down, regardless of the color of the piece, as shown in Figure 2.
 The Cannon cannot move (i.e., one square up, down, left, or right), unless it is a capturing action. 

4. Each piece has a certain number of points, as shown in Table 1. When a player uses one of her or his pieces to capture an opposing piece, the player gets the points of the captured piece. The player who gets 60 points first wins the game.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值