linked JavaScript game to front interface using JQuery