I wrote the code in Notepad++ on my windows box then moved the script on a linux box and did the testing and code fixing in there and apparently forgot to fix a few minor typos. All should be fine now.
What did you do to make it work? Copy/paste issues or what?
Once the game is over, the king and the pawn go back in the same box.