This should become a member variable, not a class variable. When the user calls setBoardWidth (actually should be called setBoardSize) then you should dynamically recreate the board array and all the other supporting arrays. Simply setting the static field does not change anything.