def generate_hexagonal_board(radius=2):
    """
    Creates a board with hexagonal shape.

    The board includes all the field within radius from center of the board.
    Setting radius to 0 generates a board with 1 hexagon.
    """
    def hex_distance(a, b): return int(abs(a[0] - b[0]) + abs(a[1] - b[1]) + abs(a[0] + a[1] - b[0] - b[1])) / 2

    width = height = 2 * radius + 1
    board = [[0] * height for _ in range(width)]
    center = (radius, radius)

    for x in range(width):
        for y in range(height):
            board[x][y] = int(hex_distance((x, y), center) <= radius)
    return board