def construct_net_input(state, action):
    """ Constructs list which can be used as input to neural net.

    Example input:

    state.board = [[ None, None, None ],
                   [    1,    2, None ],
                   [    1,    2,    1 ]]

    action = 3

    Example output:
    [ 0, 0, 0, 1, 2, 0, 1, 2, 1, 3 ]

    """
    return [field if field is not None else 0 for row in state.board for field in row] + [action]