MinezJ
Hello, this is MinezJ, Java applet implementation of famous minesweeper game. Source code and generated documentation can be found here, full source distribution is available here.
Compile with "javac -target 1.1" in order to make it working with Microsoft Internet Explorer with Microsoft Java Virtual Machine. It won't work otherwise returning "applet can't be instantiated" (use of inappropriate or JDK deprecated methods) or "class minezj not found" could appear.
Playground is represented by byte array, one byte for one cell. Byte's low nibble (4 least significant bits) contains count of surrounding mine fields (0-8). If there's a mine on a field, it's low nibble's value is 9.
-
Bit 4 (0x10) indicates whether the field is revealed (=1).
-
Bit 5 (0x20) indicates whether the field is marked (=1).
The applet can be invocated via applet tag where parameter "bgcolor" may be passed which specifies the background color of the applet. Note that the value has to be specified in decadic format. It is standard RGB color specification, one byte per color. In this case the 16777215 = 0xFFFFFF which is white color. If the applet resides in other directory the codebase has to be set accordingly.
<applet code="minezj.class" codebase="../" width="450" height="250">
<param name="bgcolor" value="16777215">
</applet>
Have fun! Ondra Havel, 2006-1-27, Darmstadt, Germany
Generated on Thu Jan 26 22:02:52 2006 for MinezJ by
1.4.3