A Java Applet: Snooker

Many years ago (mid 1990s) I wrote a simple Java Applet while teaching myself the language. At the time of writing it was a bit slow without a high-end processor, so I was overly worried about performance. These days it runs just fine.

You may notice that I haven't quite got the rules right; and some of the ball replacement rules are a bit iffy. Even worse though, once you start applying spin, you'll find that even the laws of physics are not quite right.

Just click the mouse over the cue ball and drag a line away from it. The line represent the cue - its direction and power. Release the mouse button and take the shot. If you mess up, and want to re-take the shot: just press the space bar. The balls will be replaced.

There are several classes involved; so it may take a while to load. Also, please note that netscape is somewhat challenged by it - I sometimes get NullPointer Exceptions from the Java engine. I think its because I used a firly old version of the Java libraries, and then wrote it under Microsoft.



If you have any comments then please feel free to contact me.

Back to my Home Page.


I've had a request to make the source code available. Well, here it is. Its not of high quality -- it wrote it a few years ago when learning the language. Its written for Java 1.0, so you'll need to use the -deprecation flag when compiling it for jdk 1.1 and above.