Nothing is magic. You created a new "board" variable in your constructor, thus "hiding" the class board variable. So the board variable that you initialize in your constructor is not the same one...