Function
test
(l=200, n=4, fun=sun, startpos=(0,0), th=2)
Source from the content-addressed store, hash-verified
| 130 | resizemode("user") |
| 131 | |
| 132 | def test(l=200, n=4, fun=sun, startpos=(0,0), th=2): |
| 133 | global tiledict |
| 134 | goto(startpos) |
| 135 | setheading(0) |
| 136 | tiledict = {} |
| 137 | tracer(0) |
| 138 | fun(l, n) |
| 139 | draw(l, n, th) |
| 140 | tracer(1) |
| 141 | nk = len([x for x in tiledict if tiledict[x]]) |
| 142 | nd = len([x for x in tiledict if not tiledict[x]]) |
| 143 | print("%d kites and %d darts = %d pieces." % (nk, nd, nk+nd)) |
| 144 | |
| 145 | def demo(fun=sun): |
| 146 | start() |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…