It's hard to say what is happening because I don't know what some of
your code does. You have some function .getAlive() which seems to be
a method of your 2D array c[][]. Arrays aren't classes so they can't
have methods. Is this a typo? Anyway since getAlive() is part of
the if() it still would be difficult to determine the behaviour. One
question though, what happens when you set the limits of the four
loops to (x= -1; x<3; x++),(y= -1; y<3; y++)