【v1.1.0】【C Language/Open Source】Command Line Chinese Chess

On a certain day of a certain year, a certain person thought that if he didn’t review the C language, it would be useless if he didn’t review it, so he started a new project——

"? ? 》 is a chess game developed by someone. You will explore a fantasy world called "Chu-Han Conflict" in the game. In this vast world, you can travel across the two countries, meet companions with different personalities and unique abilities, fight with them against powerful enemies, and embark on the road to find the throne; you can also roam without destination and immerse yourself in a world full of adventures. In a living world, let your curiosity drive you to explore the mysteries in every corner... until you are reunited with the separated throne and witness the precipitation of everything at the end.

1. Update log

v1.0.0: Pathfinding prompt version 2023.02.25

  1. Initial implementation of basic pathfinding logic
  2. Realizes the movement of chess pieces and judgment of victory or defeat
    v1.0.0

v1.1.0: Regret Chess Edition 2023.03.02

  • The regret function has been initially implemented (important)
  • Each move will generate an instruction record (init_pos, dest_pos, remove_block) stored in a two-dimensional array on the chessboard.
  • Enter w during the selection phase to perform an undo, which will roll back the latest two instructions in the record.
  • Implemented a major refactoring
    v1.1.0

2. Design ideas

After the basic version was completed, it was sorted out and reconstructed so that the software architecture basically conforms to the figure below.

  • The first layer: basic data structure
    • piece
    • action
  • Second layer: auxiliary data structure
    • chess piece stack
    • action stack
    • wait
  • The third layer: combined data structure and data core
    • checkerboard
  • The fourth layer: logical core, human-computer interaction
    • Logical judgment module
    • Operation module
    • Message management module

Design ideas

3. Outlook

  • Continuous multi-step regret chess will be launched before v1.2.0, and the human-computer interaction experience will be further optimized;
    • When v1.2.0 is officially released, a practical human-machine confrontation mode will be created, that is, artificial chess AI will be completed and deployed into the game.
  • Chess AI based on reinforcement learning model AlphaZero may be launched in v1.3.0
  • Later, we will use js to reconstruct the game logic and use html to deploy the front-end interface.

4. Project

Interested friends can send me a private message and participate in the project development. Please take care of me.

Github:
123sleaf-123/ChineseChess-

Guess you like

Origin blog.csdn.net/weixin_50750441/article/details/129293197