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

Function index

memorygame.py:24–26  ·  view source on GitHub ↗

Convert (x, y) coordinates to tiles index.

(x, y)

Source from the content-addressed store, hash-verified

22
23
24def index(x, y):
25 "Convert (x, y) coordinates to tiles index."
26 return int((x + 200) // 50 + ((y + 200) // 50) * 8)
27
28
29def xy(count):

Callers 1

tapFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected