protected Point getMidEdge(Point cellCenter, Directions dir) {
        int x1 = cellCenter.x - hexWidthInPixels / 2;
        int x2 = cellCenter.x - hexWidthInPixels / 4;
        int x3 = cellCenter.x;
        int x4 = cellCenter.x + (hexWidthInPixels - 1) / 4;
        int x5 = cellCenter.x + (hexWidthInPixels - 1) / 2;
        int y1 = cellCenter.y - (3 * hexSideInPixels)/4;
        int y2 = cellCenter.y;
        int y3 = cellCenter.y + (3 * hexSideInPixels)/4;
        switch(dir) {
            case northwest:  return new Point(x2, y1);
            case northeast:  return new Point(x4, y1);
            case west:       return new Point(x1, y2);
            case east:       return new Point(x5, y2);
            case southwest:  return new Point(x2, y3);
            case southeast:  return new Point(x4, y3);
            case none: default: return cellCenter;
        }
    }