Battle Analysis: Battlefield


The battlefield consists of a wargame map and playing pieces representing the actual military units that fought in the conflict. A hexagonal grid is superimposed to regulate movement and the postion of the playing pieces. The wargame map has terrain features that affect movement and combat. The numbers and symbols on the playing pieces represent the strength and type of units.

The battlefield displays unit and terrain information as the mouse moves over the wargame map and units. As the mouse moves over the battlefield, the hexagon name and terrain is displayed.

Wargame commands are generated when the mouse down event occurs on the wargame map and units.

Click on a counter to activate the unit. Click again to place the counter.

Project Steps:

  1. Hexagon Library: hexagon math for unit placement, range, bearing and line of sight.
  2. Battlefield: wargame map and unit images for display and mouse events.
  3. Commands: process mouse events into wargame commands.
  4. Rules: implement wargame movement and combat rules.
  5. Order of Battle and terrain: methods and data.
  6. Calculators: implement special movement and combat rules.

The Hexagon Library uses analytical geometry on a cartesian coordinate system to calculate range, bearing and line of sight. Hexagons are located by a () coordinate. The hexagon name is calculated .