Rendering is based on HTML and CSS techniques. Computer moves are programmed in regular Java code in the Eclipse plug-in. The SWT Browser widget is used for rendering and reacting to user input.
The board is a table filled with hyperlinks. Cascading Style Sheets
provide various themes and control the table aesthetic appearance.
The API org.eclipse.swt.browser.Browser.setText(java.lang.String)
draws
the board game from HTML generated in memory.
Player moves are captured by implementing the interface org.eclipse.swt.browser.LocationListener
.
e.g the player clicks on a cell that may generate a hyperlink with a URL similar to
http://www.org.eclipse.swt.examples.browser.demos/xx1yy2
. That hyperlink identifies
the position of the cell selected by the player (column 1, row 2). The move is completed by generating
new HTML content and invoking Browser.setText
to update the board game.