Drawing a Hexagon Map
javascript code to draw hexagon map
function isCenter(x,y) {
var isCenterType = false;
if ( x % 8 == 0 && y % 8 == 0 ) isCenterType = true;
if ( x % 8 == 4 && y % 8 == 4 ) isCenterType = true;
return isCenterType;
}
function drawHexagon(x,y){
drawHexagonAtPixel((*x + ),(*y + ));
}
for (y = 16; y <= 48; y += 4 ){
for(x = 8; x <= 24; x += 4){
if( isCenter(x,y) ) drawHexagon( x, y);
}
}