Skip to content
Ben Smithers edited this page Dec 27, 2019 · 2 revisions

Home > Core > Hex

Overview

These objects make up the backbone of the Hexmaps. They are hexagons. In map implementations they should contain any information relevant specifically to that environment like

  • weather

  • landscape

  • terrain

or other such things. Points of interest on a map (such as settlements) should be stored as Entities - not as attributes on the hex.

Class Attributes

  • center: the center of the hexagon, a Point.

  • radius: the 'radius' of the hexagon. This is the distance from the center to any one of the vertices. When a Hex is constructed, this attribute should be the drawscale of a Hexmap.

  • vertices: a list of the Hexes vertices (as Points).

Class Methods

There are none. Hexes don't do anything, they just are.

Clone this wiki locally