minor change to front-end javascript

making boardState a global variable