Problem with array of objects from a class

So why does it still run and place the snakes starting position at w/2 h/2?