Which lines of code contain the logic for this? Locate them and test them to verify they perform as expected.

Do you understand what you are changing? Do you understand what boardSize is as in...