public static Square getSquareBehindWall(Square[][] level, Square square, InSquarePositionType wallPosition) {
        int height = level.length == 0 ? 0 : level[0].length;
        int width = level.length;


        if (wallPosition.equals(InSquarePositionType.North)) {
            if (square.y == 0) {
                return level[square.x][height - 1];
            } else {
                return level[square.x][square.y - 1];
            }
        }
        if (wallPosition.equals(InSquarePositionType.East)) {
            if (square.x == width - 1) {
                return level[0][square.y];
            } else {
                return level[square.x + 1][square.y];
            }
        }
        if (wallPosition.equals(InSquarePositionType.South)) {
            if (square.y == height - 1) {
                return level[square.x][0];
            } else {
                return level[square.x][square.y + 1];
            }
        }
        if (wallPosition.equals(InSquarePositionType.West)) {
            if (square.x == 0) {
                return level[width - 1][square.y];
            } else {
                return level[square.x - 1][square.y];
            }
        }
        EobLogger.println(String.format("[ERROR] Square on position [%d, %d] not contain wall at side %s.", square.x, square.y, wallPosition.name()));
        return null;
    }