All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Games
King to F1 (Posted on 2008-07-23) Difficulty: 2 of 5
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.

See The Solution Submitted by pcbouhid    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: cheating computer solution | Comment 5 of 8 |
(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

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information