A console application that determines whether the black king is in check mate or not by giving a chess board situation.
Given an 8x8 chess board situation where:
“..” means no piece
“bK” means black king
“bO” means black other piece. The type of the piece does not matter for this puzzle.
“wR” means white rook
“wN” means white knight
“wK” means the white king
There will be no pawns, queens or bishops on the board.
The board situation can be hardcoded in the program or retrieved via file input mechanisms.
With normal rules of chess, assuming only the black king can move, determine whether the black king is in check mate or not.
For example:
................
..bK............
................
................
................
wRwRwR..........
................
................
The black king is in checkmate.
................
..bK............
................
................
................
wRwR............
................
................
The black king is NOT in checkmate.