wrote code for clearBoard and updateBoard in the Board class