This reminds me of the C# source code for DRAGON. Its code was actually much worse, because the creator wasn't aware of things like loops or method definitions (the main game loop and class appear to have been generated by a framework).
The C# code is here, and it works well enough that you can buy it on Steam, apparently: https://gist.githubusercontent.com/alessonforposterity/832da...