puzzle like game

Please edit your post to use code-tags rather than plain-text for code.

Thanks.