Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
24
def
index(x, y):
25
"Convert (x, y) coordinates to tiles index."
26
return
int((x + 200) // 50 + ((y + 200) // 50) * 8)
27
28
29
def
xy(count):
Callers
1
tap
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected