import Grid; import Grid.IO; import Grid.Color; import Share; import Toolbox; import Mode; import * as Play from Mode.Play; import * as Solve from Mode.Solve; import * as Edit from Mode.Edit; Toolbox.init(); Mode.init({ play: Play, solve: Solve, edit: Edit }); Grid.init(Mode.dispatch); if(window.location.search.length > 0) { var urlSearchParameters = new URLSearchParams(window.location.search); Grid.Color.set(Share.decode(urlSearchParameters.get('game'))); } Grid.IO.init();