refactoring in creation of gameboard