Implementing Chess using Object-oriented Programming and Advanced Data-Structures
For an Algorithm BackTracking is used as a tree search
Backtracking has three fundamental traits:
1-When faced with a choice, each possibility is explored recursively.
2-After trying one choice and before trying the next, the program state is restored back to exactly what it was before trying the first choice.
3-When it’s clear an exploration path will not lead to a viable solution, the exploration of that path stops.
BackTracking is used to find all possible solutions for the King to escape Checks and to declare Checkmates if no solutions are found.
And Here is the Final View!!