Xiangqi Board
The board is a rectangle formed by 9 vertical lines and 10 horizontal lines intersecting at 90 points. A blank space called the river horizontally divides the board into two equal symmetrical halves. Each side has a square Palace (3x3 grid) formed by 4 squares spanning from files 4 to 6 on the back ranks, marked with a diagonal X.
By convention, when viewed directly, Red pieces are at the bottom and Black pieces are at the top. Red's vertical files are numbered from 1 to 9 from right to left. Black's vertical files are numbered 9 to 1 from right to left.
Board Setup
To set up the Xiangqi board, you simply need to identify the pieces described below and arrange them according to the sample image.
Piece Types and Movements
Each game starts with 32 pieces, 16 Red and 16 Black, divided into seven types. Although the characters representing them may differ slightly between colors, their values and movements are identical. The seven types, their symbols, and quantities per side are as follows:
| Piece |
Symbol |
Quantity |
| King |
 |
 |
1 |
| Advisor |
 |
 |
2 |
| Elephant |
 |
 |
2 |
| Chariot |
 |
 |
2 |
| Cannon |
 |
 |
2 |
| Horse |
 |
 |
2 |
| Soldier |
 |
 |
5 |
Xiangqi Rules
Pieces move according to the following rules:
- King: Moves one point at a time, horizontally or vertically. The King must always stay within the palace and cannot move outside.
- Advisor: Moves one point diagonally per turn. Advisors must also stay within the palace.
- Elephant: Moves exactly two points diagonally. Elephants are confined to their own side of the board and cannot cross the river. Their move is blocked if there is a piece on the intervening point (the "elephant's eye").
- Chariot: Moves horizontally or vertically any number of clear points.
- Horse: Moves one point horizontally or vertically, followed by one point diagonally outward. The move is blocked if there is a piece adjacent to the horse on the initial orthogonal step.
- Cannon: Moves like a chariot when not capturing. To capture, it must jump over exactly one piece (friendly or enemy) along its path.
- Soldier: (Or Pawn) moves one point forward. After crossing the river, it gains the ability to move one point horizontally, but can never move backward.
- Capturing: When a piece legally moves to a point occupied by an enemy piece, the enemy piece is captured and removed from the board.
- Flying General: The two Kings cannot face each other on the same vertical file without any pieces between them. A move creating this situation is illegal.
- King's Safety: After making a move, your King cannot be left in a position where it can be captured by an opponent's piece on their next turn (in check). Such moves are illegal.
Game Modes
There are 4 modes: Play alone, Practice with AI, Play online, and Puzzles.
- Play alone: Click the "Play alone" button on the homepage to practice on an open board.
- Practice with AI: Players can play Xiangqi with AI directly on the homepage. There are 5 difficulty levels: Beginner, Easy, Normal, Hard, and Hardest.
- Play online: Click "Play online" to open a new room with a random Room Code and create a password. You can invite friends by sharing the link and password. Alternatively, visit the "Lobby" to join an existing room. Red plays first.
- Puzzles: For experienced players. Click "Puzzles" on the homepage to arrange the board freely. You can save your puzzle and invite friends to solve it, or play against the AI.