Example #1
0
func control() {
	//
	scr.SwitchFontsize(font.Normal)
	scr.Write("          ", 1, 0)
	scr.WriteNat(figures.Num(), 1, 0)
	scr.WriteNat(figures.NumPred(func(a Any) bool { return a.(*fig2.Imp).Marked() }), 1, 5)
}
Example #2
0
func (x *Imp) Write() {
	//
	const n0 = 1
	for n := uint(0); n < x.file.Num(); n++ {
		scr.Colours(col.Yellow, col.Green)
		scr.WriteNat(n, n0+n, 0)
		//    x.tmp = x.read (n)
		//    x.tmp.Write (n0 + n, 8)
		x.read(n).Write(n0+n, 4)
	}
	for d := uint(1); d < maxDepth; d++ {
		scr.WriteNat(x.idx[d], n0+d, 70)
	}
}
Example #3
0
func (x *Imp) Write(l, c uint) {
	//
	scr.Colours(col.White, col.Blue)
	scr.WriteNat(x.num, l, c)
	c += 4
	for i := uint(0); i < max; i++ {
		scr.Colours(col.Yellow, col.Red)
		scr.WriteNat(x.pos[i], l, c)
		c += 4
		scr.Colours(col.White, col.Blue)
		scr.Write(x.content[i].(*text.Imp).String(), l, c)
		c += 10
	}
	scr.Colours(col.Yellow, col.Red)
	scr.WriteNat(x.pos[max], l, c)
}
Example #4
0
func (x *Imp) F(i uint) Any {
	//
	for k := uint(0); k < x.n; k++ {
		x.object = x.f(x.mon[k].F(x.object, i), i)
		scr.WriteNat(k, 40, 0)
	}
	return x.object
}