got ajax to work and send back gamestate and index of element clicked