MCPcopy Create free account
hub / github.com/geekcomputers/Python / tap

Function tap

memorygame.py:34–44  ·  view source on GitHub ↗

Update mark and hidden tiles based on tap.

(x, y)

Source from the content-addressed store, hash-verified

32
33
34def tap(x, y):
35 "Update mark and hidden tiles based on tap."
36 spot = index(x, y)
37 mark = state["mark"]
38
39 if mark is None or mark == spot or tiles[mark] != tiles[spot]:
40 state["mark"] = spot
41 else:
42 hide[spot] = False
43 hide[mark] = False
44 state["mark"] = None
45
46
47def draw():

Callers

nothing calls this directly

Calls 1

indexFunction · 0.70

Tested by

no test coverage detected