@Bombastino It seems that the indentation of these lines is not correct:

for i in range(j, maxx-j, 2): FeldMatrix [j,i] = freiesFeld FeldMatrix [j,i+1] = nullFeld