changed gameboard to behave as pointer and added bound checking
changed gameboard to behave as pointer and added bound checking