import math


def getSquare(Sudoku, posX, posY):
    """
    Returns all numbers, which are located in the square, which belongs to the given position
    The Square is a 3x3 field in an 9x9 2D-array
    """

    numbers = []
    SqX = math.floor(posX / 3)
    SqY = math.floor(posY / 3)

    for x in range (SqX * 3, (SqX * 3) + 3):
        for y in range (SqY * 3, (SqY * 3) + 3):
            if(Sudoku[x][y] != 0):
                numbers.append(Sudoku[x][y])
    return numbers