MODULE; IMPORT ChipsVBT, ZPaperViewClass, View, ZeusPanel; REVEAL T = ZPaperViewClass.T BRANDED OBJECT chips: ChipsVBT.T; OVERRIDES oeInit := Init; oeSet := Set; END; PROCEDURE ViewFn SetChipsVBT (view: T; chips: ChipsVBT.T) = BEGIN view.chips := chips END SetChipsVBT; PROCEDUREInit (view: T; N, k: INTEGER) = BEGIN ChipsVBT.Reset(view.chips, N, N, k); END Init; PROCEDURESet (view: T; x, y, val: INTEGER) = BEGIN ChipsVBT.Set(view.chips, x, y, 1 + val) END Set; PROCEDURENew (): View.T = VAR c := NEW(ChipsVBT.T).init(); BEGIN RETURN NEW(T, chips := c).init(c) END New; BEGIN ZeusPanel.RegisterView (New, "Panel", "ZPaper"); END ViewFn.