def get_neighbors(coords):
    """
    Find neighbors of coord in a field.

    ARGUMENTS:
    coords - in format [x, y]

    RETURNS:
    list of neighbors, where each neighbor has format [x, y]
    """
    neighbors = []
    directions = [(-1, 0), (0, -1), (1, 0), (0, 1)]

    # for every direction, get neighbor coords, append to list
    for vector in directions:
        neighbor = []
        x = coords[0] + vector[0]
        y = coords[1] + vector[1]
        neighbor.append(x)
        neighbor.append(y)
        if neighbor[0] > 9 or neighbor[1] > 9:
            continue
        if neighbor[0] < 0 or neighbor[1] < 0:
            continue
        neighbors.append(neighbor)
    return neighbors