Xiangiqgame
AI engine for Xiangqi
|
The following screenshot shows the state of the terminal UI after a human red player has executed a single opening move.
In our simple text-based game board, each piece is represented by two characters. The first character represents the piece type, and the second character represents the color.
Unoccupied spaces are represented as --
The terminal UI uses algebraic notation for board spaces. Files are represented by letters a through i, ranks are represented numbers 1 through 10. Red's General starts in rank 1, and Black's General starts in rank 10. File a corresponds to Red's left-most file. To represent a specific board space, we write the file letter followed by the rank number, with no spaces in between. For example, the starting position of Black's general is e10.
The syntax for a move is: starting-board-space, ending-board-space. In the example board shown above, Red has just opened the game with: b1, c3
Although castles and rivers are not marked on our simple text game board, the core engine performs all calculations with these features in their standard locations. Using our algebraic notation, the river edges are located at ranks 5 and 6,