fixed javascript to change button text when responding to moves vs just making a move