The battlefield consists of a wargame map with counters to represent military units. The wargame map and counters are images on the screen. The mouse is used to select counters and map coordinates. A hexagon grid is superimposed over the wargame map.

The HexagonGridCalculator is a set of methods to calculate the hexagon grid coordinate from the battlefield. It is based on the Cartesian Coordinate System from Analytical Geometry.

The HexagonPointCalculator calculates the name of the hexagon using the hexagon grid coordinates.

[screen pixels] <-> [hexagon grid] <-> [hexagon name]

Click on a counter to select it. Click again to de-select the counter.

Then click on the map to move its position. Or, just drag the counter on the map.

When slected, the counters facing can be changed by pressing 1-6.

no unit selected



Programming Notes