Chinese chess vaulting traversal program

Updated on physical education 2024-05-13
6 answers
  1. Anonymous users2024-02-10

    A [8][8] matrix is used to record whether it has been accessed, a pointer is used to indicate the current location, and a stack is used to save the path, and then it is good to keep trying......

    If you are too lazy to use stack, you can use recursion to do it, which is simpler, and recursion in the range of 8*8 should not overflow.

  2. Anonymous users2024-02-09

    The Chinese chess jumping horse problem refers to how to use the horse to move the "day" shape to capture the opponent's chess pieces. Below is a simple flowchart to help beginners understand the solution to this problem.

    First of all, we need to understand what the word "day" is. As shown in the figure below, the rule for horses to walk the zigzag "day" is: first go forward or backward two squares, then go left or right one square. In other words, the horse's actions on the chessboard resemble a "day" count.

    Next, let's take a look at how to use the horse to take the "day" shape to capture the opponent's pieces. Let's say our knight's position on the board is A, and we want to capture the opponent's piece B. Then we need to follow the steps below:

    1.The horse walks two squares forward or backward to the C or D position.

    2.The horse then walks one block to the left or right to the E or F position.

    3.If the knight is in E or F position, then it can capture the opponent's piece B.

    As shown in the diagram below, this flowchart clearly shows how we can use the horse to take the "day" shape to capture the opponent's pieces.

    In conclusion, with this simple flowchart, we can easily grasp the solution to the Chinese chess jumping horse problem. Of course, this is just an entry-level demonstration, and in fact there are many variations and complexities in the vaulting problem that require constant practice and mastery.

  3. Anonymous users2024-02-08

    Handsome (General) Red is "Handsome" and Black is "General". Shuai and He will be the leader of chess, and it is the goal that both sides strive for. It can only be found in"Nine Palaces"Within the activity, you can go up or down, you can go left or right, and you can only walk one square according to the vertical or horizontal line each time.

    Shuai and will not be directly opposite each other in the same straight line, otherwise the side will be judged to lose. (will take the field character grid).

    Shi (Shi) Shi (Shi) is the personal bodyguard of the general (handsome), and it can only move around in the Nine Palaces. Its path can only be a diagonal line within the nine squares. (Taxi X).

    The red side is the "phase" and the black side is the "elephant". The main role of the phase (elephant) is to defend and protect one's handsome. Its way of walking is to walk diagonally two squares at a time, commonly known as "elephant flying field".

    The scope of activity of the phase (elephant) is limited to the position within the "river boundary", and can not cross the river, and if it walks the word "field" ** has a chess piece, it can not go, commonly known as "plugging the elephant's eye". (Elephant Tobida).

    Che (jū che) The rook is the most powerful in chess, and it can be walked on both horizontal and vertical lines, and there is no limit to the number of moves as long as there is no child to stop it (the rook takes a straight road). Therefore, a car can control seventeen points, so it is known as "one car and ten sons".

    When the cannon is not eating, it moves exactly the same as the car.

    But when the cannon eats a piece, it must jump over a chess piece, both our and the enemy's, commonly known as "cannon hitting the partition" and "cannon hitting the mountain".

    The way for horses to walk is to always obliquely, that is, first walk horizontally or straightly, and then walk diagonally in a diagonal, commonly known as "horse walking day".

    The horse can go to the selection point at a time can reach eight points around it, so there is a saying of "eight sides of majesty". If there are other chess pieces in the direction to go, the horse will not be able to walk over, commonly known as "lame legs". (Horse Walking Slanting Day).

    pawn (pawn) Red is "pawn", black is "pawn". Before crossing the river, the soldiers (pawns) can only move forward step by step, and cannot retreat, but can move forward. After crossing the river, you can move left and right, but you can only take one step at a time, even so, the power of the soldier (pawn) is also greatly enhanced, so there is a saying that "the pawn who crosses the river is half a car".

    The pawn crossed the river and walked sideways).

  4. Anonymous users2024-02-07

    It can be understood that the horse's move is to move forward 2 steps sideways, and the first step forward with a chess piece is a lame horse.

  5. Anonymous users2024-02-06

    You can't jump next to yourself next to each other.

  6. Anonymous users2024-02-05

    Walking the Japanese word, up and down, left and right, as long as it is a day, you can jump.

Related questions
6 answers2024-05-13

There is no sure way to win in chess, and there is no guarantee that you will not lose, no matter how powerful you are, there will be times when you lose, but it is also less to lose, to win more and lose less. >>>More

27 answers2024-05-13

The general does not leave the Nine Palaces, and the soldiers do not leave the official. >>>More

5 answers2024-05-13

The term chess first appeared during the Warring States period. In "Chu Ci and Summoning Spirits", there is a special record of its form and method of playing: "There are six books of chess; Divide the camp and march together, and the road is more pressing; Become a lord and make a profit, call five white. >>>More

10 answers2024-05-13

The latest edition of "Chinese Chess Rules" 2011, the allowed continuous moves** detailed explanation, chess lovers must know and learn the rules, conducive to improving their own chess skills, the next set.

16 answers2024-05-13

Similarities: 1. The chessboard layout is the same, the difference is that the Chinese chess pieces are placed at the intersection of the grids, while the chess pieces are placed in each square. >>>More