If the Black knight (at h4) must stay immobile and cannot be captured, how can you get the White king (at h2) to the empty f1 square by making consecutive White moves within the portion of the board shown? At any time, the White King may not move into check.
(In reply to
cheating computer solution by Charlie)
What is the language? I know it's not QuickBasic, at least not my ancient version, QBasic?
No matter. I note that "Start_Click()" initialises the 'playing area', calls a subroutine to test possibilities which on completion allows "Start_Click()" to terminate.
Each Case is the x-y coordinates rather than using Rank and File. I haen't determined the complete program flow, but lvl is a counter for the number of moves that it takes before the King is at last at KB1 (f1 or 61 depending upon notation).
It seems to me that the program had 'prior knowledge' as to when it should end:
If lvl > 27 Then lvl = lvl - 1: Exit Sub
but there s also the condition:
If b$(6, 1) = "k" Then...... Exit Sub
It would appear that the lvl>27 (decrementing to 26) was placed as a test against what Dej Mar found in the event that Dej Mar may have been incorrect. I think the program should have allowed the lvl counter to increment until the program terminated when its value would have been reported.
Was that the "cheat"?
|
Posted by brianjn
on 2008-07-28 05:21:02 |