"""Read-only Glass pallet geometry from installed controller and observed puzzle notes. Only computes a planner snapshot. Never writes the game or save. """ from play import ROOT,json,pathlib def refresh(v,source): variables={int(k):z for k,z in v['variables'].items()};positions={int(k):[e['x'],e['y']] for k,e in source.items()} cs=source['64']['pages'][0]['list'];start=next(i for i,c in enumerate(cs)if c['code']==111 and c['parameters'][:2]==[1,408]) branch={} for c in cs[start:]: code,indent,a=c['code'],c['indent'],c['parameters'] parent=all(b for k,b in branch.items()if k=operand,left<=operand,left>operand,left