Draw image and tiles.
()
| 45 | |
| 46 | |
| 47 | def draw(): |
| 48 | "Draw image and tiles." |
| 49 | clear() |
| 50 | goto(0, 0) |
| 51 | shape(car) |
| 52 | stamp() |
| 53 | |
| 54 | for count in range(64): |
| 55 | if hide[count]: |
| 56 | x, y = xy(count) |
| 57 | square(x, y) |
| 58 | |
| 59 | mark = state["mark"] |
| 60 | |
| 61 | if mark is not None and hide[mark]: |
| 62 | x, y = xy(mark) |
| 63 | up() |
| 64 | goto(x + 2, y) |
| 65 | color("black") |
| 66 | write(tiles[mark], font=("Arial", 30, "normal")) |
| 67 | |
| 68 | update() |
| 69 | ontimer(draw, 100) |
| 70 | |
| 71 | |
| 72 | shuffle(tiles) |
no test coverage detected