okay, first off, as the organizer of the 4K contest, let me tell you [as it was already stated]: it is a bad idea to for newbies to learn from 4K games!
. we use many optimization tricks, such as one-letter variables, classes with only 1 method (main), etc. most 4K games code are unorganized, unstructured, unconventional, and borderline undreadable. but fortunately, some of the 4K codes are commented - like Miners4K. but still, that's a doozy.
now, with that said. Miners4K is not an applet, so you cannot put it in a webpage. The only programs that can be put in a webpage are classes that extend Applet and implement the init() and paint() methods, to name a few.
as far as the Miners4K source goes, you should be able to compile it like so:
and execute it like so:
if you want another 4K code goodie, you can hack around at my game, Goomba4K
. It didn't win the contest like Miners4K did, but hey - it's another game to toy with. You can mess with it however you want. In fact, if you want to start a thread about a question about my code, that'd be fine too.