Hi all,
I'm trying to do a practice from a book I learn from,
and no success so far.
"This program will be asked to answer whether the black king is threatened – by white Tools (condition called chess), or not threatened.
Threat to the King is that there is a white tool that can access the square which is the black king
during one play.
The program prompts the user to enter three numbers of the row, column, tool, and return on it in a loop
until final input. Input series ends when one of the values of the column, row or tool exceeds
Defined boundaries. I.e.: tool less than - 1, greater than - 5 or coordinates tile extends beyond the boundaries
Board. As in the previous sections, the negative coordinates are considered exception limits the board.
There is no limit on the amount of different types of white tolls on the board, but the black king appears exactly once. (You may assume that the input does contain black king greater than once), given an input for a slot that already taken, error message will appear: "Already taken!"
After the input sequence, the program prints "check!" Or "! No check" in accordance with the state board."
I translate it, so sorry for bad english.
can some help me with an idea? or code?
R.E:
1- King black.
2- white queen.
3 - White Rook.
4 - white knight.
5 - white runner.
I'm a beginner so no functios an such:(