• ## Analysis and Realization of eight queens problem

Time：2021-4-15

Eight queens problem Eight queens problem is an old and famous problem, which is a typical case of backtracking algorithm. In 1848, the chess player Max Bessel put forward the question: put eight queens on the 8 × 8 space chess, so that they can’t attack each other, that is: any two Queens can’t be […]

• ## Second battalion commander, quickly draw a CSS to draw a tic tac toe game for me

Time：2021-3-8

Author: Chen dayutau github： KRISACHAN preface I don’t know if you ever played a game called “Jingzi chess” when you were young. It looks like this: (I won, praise me quickly ~ o (′ ^ ‘) o) The above is the final result of this article, a pure CSS implementation of AI tic tac toe […]

• ## Eight queens problem — recursive backtracking

Time：2021-1-30

1. Eight queens Put eight queens on the 8 × 8 chessboard so that they can’t attack each other, that is, any two Queens can’t be in the same row, the same column or the same diagonal line. How many kinds of pendulum are there. 2. Ideas This problem is very suitable to be solved […]

• ## C practical exercise topic 9

Time：2020-12-17

Title:Request to output chess board. Program analysis:The chess board consists of 64 black and white squares, which are divided into 8 rows * 8 columns. I controls the row, J controls the column, and controls the output black or white squares according to the change of the sum of I + J. In case of […]

• ## C / C + + programming diary: development of logic tic tacit (circle cross) game

Time：2020-11-16

Problem Description: In a 3 * 3 chessboard, as long as three identical pieces appear on a line, the player wins (player or computer); if the chessboard is full and there are not three pieces in a line, a tie is made. Details: Initialize chessboard (with spaces)     //Initialize chessboard voidinitChess(charchessbox[ROW][COL]){ for(introw=0;row Print chessboard […]

• ## Let’s learn the program – Gobang

Time：2020-10-8

preface When I was a child, I liked playing the building block games on TV. At that time, there were many electronic products. I knew the words low and high in primary school, so I saved my pocket money and got the advanced version of the game–Little overlord learning machineIt’s a “game machine”, especially during […]

• ## Programming in C language (20): River Crossing

Time：2020-4-22

Example 20 river crossing Title Description As shown in Figure 1, there is a river crossing pawn at point a of the chessboard, which needs to go to point B of the target. Pawn walking rules: can be down, or right. At the same time, there is an opponent’s horse at any point on the […]

• ## Programming in C (20): River Crossing

Time：2020-4-21

Example 20 river crossing Title Description As shown in Figure 1, there is a river crossing pawn at point a of the chessboard, which needs to go to point B of the target. Pawn walking rules: can be down, or right. At the same time, there is an opponent’s horse at any point on the […]