@Override
    public Point2D getNeighborByDir(int dir, int baseX, int baseY) {
        dir = dir % getNeighborCnt();
        int newX = baseX, newY = baseY;
        switch (dir) {
        case 0: newX += 1; break;
        case 1: newY += 1; break;
        case 2: newX -= 1; break;
        case 3: newY -= 1; break;
        case 4: newX += 1; newY -= 1; break;
        case 5: newX -= 1; newY += 1; break;
        }
        return new Point2D(newX, newY);
    }