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