MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / isOnBoard

Function isOnBoard

src/gamesbyexample/sonar.py:73–75  ·  view source on GitHub ↗

Returns True if (x, y) is on the board, otherwise False.

(x, y)

Source from the content-addressed store, hash-verified

71 return chests
72
73def isOnBoard(x, y):
74 """Returns True if (x, y) is on the board, otherwise False."""
75 return x >= 0 and x <= 59 and y >= 0 and y <= 14
76
77def makeMove(board, chests, x, y):
78 """Change the board data structure with a sonar device character.

Callers 1

askForPlayerMoveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected