Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/asweigart/PythonStdioGames
/ getRandomLocation
Function
getRandomLocation
src/gamesbyexample/pygame_games/wormy.py:164–165 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
162
163
164
def
getRandomLocation():
165
return
{
'x'
: random.randint(0, CELLWIDTH - 1),
'y'
: random.randint(0, CELLHEIGHT - 1)}
166
167
168
def
showGameOverScreen():
Callers
1
runGame
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected