An open API service indexing awesome lists of open source software.

https://github.com/vasikyrg/eight-queens

Eight queens problem which i tried to solve it when i was in my first semester in university.
https://github.com/vasikyrg/eight-queens

c

Last synced: 2 months ago
JSON representation

Eight queens problem which i tried to solve it when i was in my first semester in university.

Awesome Lists containing this project

README

        

# Eight-Queens
Eight queens problem which i tried to solve it when i was in my first semester in university.

Chess is played on a square chessboard consisting of eight rows and eight columns. The 'Queen' from a given position on the chessboard, can move horizontally (ie along the entire line of the chessboard), vertically (ie across the entire chessboard column) or diagonally. We say that a 'Queen' can "attack" another piece, if she can move to the square where the other piece is in the next move.

In the problem of the 8 Queens1, it is required to place 8 Queens on the same chessboard so that no Queen is threatened (ie can not be attacked by anyone else).

Write a program in C that dynamically binds an 8x8 board representing a chessboard. Then, during the execution of the program, ask for the position for each of the 8 Queens.Then write a function to check if this solution is acceptable. Your main to show if this solution is correct or not, using this function.