// 20);
for (int i = 0; i < max; i++) {
if (row % 2 == 1 && i % this.width == 0) {
continue;
}
Polygon p;
if (!this.inizialited) {
p = createHexagonAt(curx, cury, this.hexagonSize);
this.zones[i] = p;
} else {
p = this.zones[i];
}
if (exploratation[i] == true) {
g.setColor(Color.gray);
g.fill(p);
}
if (this.elements[i] != null) {
int x = curx + (this.hexagonSize / 2)
- (Settings.TILE_SIZE / 2);
int y = cury + (this.hexagonSize / 2)
- (Settings.TILE_SIZE / 2);
ImageManager.getGfx("command_center").draw(x, y);
}
if (this.exploratation[i] == true) {
g.setColor(Color.green);
} else {
g.setColor(Color.red);
}
g.draw(p);
// font.drawString(curx + 25, cury + 25, String.valueOf(i));
curx += wpad;
if (i % this.width == this.width - 1) {
// Start a new line
row++;
cury += hpad;
if (row % 2 == 0) {
curx = getOX() + 1;
} else {
curx = getOX() + (this.hexagonSize / 2) + 1;
}
}
if (p.equals(hoveredZone)) {
hoveredIndex = i;
}
}
if (this.hoveredZone != null && this.selectMode) {
if (this.exploratation[hoveredIndex] == this.selectableZoneIsDiscovered) {
g.setColor(Color.green);
g.draw(this.hoveredZone);
} else {
g.setColor(Color.red);
g.draw(this.hoveredZone);
}
}
// Zones with action in progress
List<HexagonMapAction> actions = GameData.getHexagonMapActions();
for (HexagonMapAction a : actions) {
if (this.equals(a.getMap())) {
Polygon poly = this.zones[a.getIndex()];
g.setColor(Color.yellow);
g.draw(poly);
int x = (int) (poly.getMinX() + (this.hexagonSize / 2) - (Settings.TILE_SIZE / 2));
int y = (int) (poly.getMinY() + (this.hexagonSize / 2) - (Settings.TILE_SIZE / 2));
if(a.isExploration()){
ImageManager.getGfx("exploration-white").draw(x, y);
}else{
ImageManager.getGfx("top_right_expand-white").draw(x, y);
}