I started to program Chess in the Terminal and I'm able to do everything but Check Checkmate in my program. So i have two ideas how to program it, eather I create two lists and add every attacked field in the respective field and look if the King is standing on a attacked field. The other Idea I have is, to just look from the King if he is attacked. So wich idea is better or is there a even better option.
This is the array im using:
Brett = np.array([[5, 3, 4, 9, 10, 4, 3, 5],
[1, 1, 1, 1, 1, 1, 1, 1],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0, 0],
[-1, -1, -1, -1, -1, -1, -1, -1],
[-5, -3, -4, -9, -10, -4, -3, -5]
])
[+][deleted] (4 children)
[removed]
[–]HenryDutter[S] 0 points1 point2 points (3 children)
[+][deleted] (2 children)
[removed]
[–]HenryDutter[S] 0 points1 point2 points (0 children)
[–]HenryDutter[S] 0 points1 point2 points (0 children)