/endless-chase

A program that shows an endless chase between a queen and a knight on a chessboard.

Primary LanguageC++

endless chase

Input: Queen's place number

Output: The path of the knight being chased by the queen (in a way that he can never hit the knight), this path is arranged in pairs Must be printed on output.

Description:

  1. The chessboard is an 8.8 array
  2. There is only one queen and one knight on the screen
  3. The program starts with the queen status by the user and the horse makes the next move.
  4. The move is done in a random place (one of the allowed moves for the next move of the queen is selected randomly)
  5. The next move of the queen must be chosen in such a way that the cause is threatened.

Attention: After multiple step, the knight may become checkmate.

WhatsApp Image 2022-05-08 at 1 33 10 PM WhatsApp Image 2022-05-08 at 1 34 27 PM