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; var size = 8; Toolbox.init(size); Mode.init({ play: Play, solve: Solve, edit: Edit }); Grid.init(size, Mode.dispatch); if(window.location.search.length > 0) { var urlSearchParameters = new URLSearchParams(window.location.search); Grid.Color.set(Share.decode(size, urlSearchParameters.get('game'))); } Grid.IO.init();