The first version written was longer than 3 lines but was really short (for such a cool game), so I decided to make it as short as possible. Starting by squeesing out spaces, joining the lines etc., I made it into 4 or so lines. Then by rearranging some IFs and adding extra ELSE I managed it into 3 lines.
That's where the lightning stroke. 3 was a magic number and I stopped there. And thats where I asked myself "what other games can I put into 3 lines of MSX BASIC?"
In later years I returned to this game and rewrote it into 2 lines, but I present original variant here since it has some personal significance to me. Unfortunately, I am not sure that presented code is the original 3 line code I wrote in 1987. There might have been changes to it since.
String in PRINT statement in line 3 may be unreadable on your MSX -- I wrote original program on Yamaha YIS-503IIR with cyrillic character set. There is really nothing to it -- it just says that you have completed the game successfully.
2 things deserve attention in this program.
First, POKE &HFBB1,1 is used to block STOP (and as a consequence -- Ctrl+STOP). It was done to make it impossible to cheat by pressing stop. As a side effect you cannot terminate the game other than completing it.
Second, istead of polling keyboard with INKEY$ program uses ON STRIG GOSUB (space bar has been pressed) interrupt. This is done to leave main loop as tight as possible to achieve fastest possible speed. Apparently the speed is too fast and delay FORJ=0TO20:NEXTJ should be inserted to make it possible to finish the game.
Since keyboard is not polled, lots of space characters end up in the keyboard buffer after game ends. Keyboard buffer is cleared by BIOS function at &h156.