added isInsideBoard function in gamestate