Esempio n. 1
0
// String make a printable version of the square and its contents
func (sq *Square) String() string {
	pl := point.PointList(sq.Points)
	return fmt.Sprintf("[%d, %d]:\n%s", sq.X, sq.Y, (&pl).String())
}
Esempio n. 2
0
func (s SnakeStrategy) orderPoints(sq square.Square, sortFunc point.SortFunction) {
	point.PointList(sq.Points).Polyline(sortFunc)
}
Esempio n. 3
0
func (sq *Square) Connect() point.PointList {
	return point.PointList(sq.Points).Polyline(point.SortXY)
}