Exemple #1
0
func (g *Generator) genStones(mt *core.Movetree) *Generator {
	r := g.c.Radius - 0.2
	bpts, _ := mt.Props().GetAsPoints(core.AB)
	wpts, _ := mt.Props().GetAsPoints(core.AW)
	for i, _ := range bpts {
		strForm := bpts[i].String()
		coord, ok := g.c.CoordMap[strForm]
		if ok {
			g.b.WriteString(Stone(coord, r, BLACK))
			g.bstones[strForm] = true
		}
	}
	for i, _ := range wpts {
		strForm := wpts[i].String()
		coord, ok := g.c.CoordMap[wpts[i].String()]
		if ok {
			g.b.WriteString(Stone(coord, r, WHITE))
			g.wstones[strForm] = true
		}
	}
	return g
}
Exemple #2
0
func (g *Generator) content(mt *core.Movetree) *Generator {
	return g.genDefs().genLines(mt).genStarPoints(mt).genStones(mt).genMarks(mt.Props())
}