def game_of_life(board):
    """
    Returns a new board with the next generation of Conway's Game of Life.
    """
    new_board = [[0 for _ in range(len(board[0]))] for _ in range(len(board))]
    for i in range(len(board)):
        for j in range(len(board[0])):
            neighbors = 0
            for x in range(-1, 2):
                for y in range(-1, 2):
                    if x == 0 and y == 0:
                        continue
                    if i + x < 0 or i + x >= len(board):
                        continue
                    if j + y < 0 or j + y >= len(board[0]):
                        continue
                    neighbors += board[i + x][j + y]
            if board[i][j] == 1:
                if neighbors < 2:
                    new_board[i][j] = 0
                elif neighbors > 3:
                    new_board[i][j] = 0
                else:
                    new_board[i][j] = 1
            else:
                if neighbors == 3:
                    new_board[i][j] = 1
                else:
                    new_board[i][j] = 0
    return new_board