extract mouse-location to its own function
call a js function when a user clicks a valid place on the board