Converts from a Minigo coordinate to a flattened coordinate.

def to_flat(coord):
    """Converts from a Minigo coordinate to a flattened coordinate."""
    if coord is None:
        return go.N * go.N
    return go.N * coord[0] + coord[1]