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

Function getButtonClicked

src/gamesbyexample/pygame_games/simulate.py:239–248  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

237
238
239def getButtonClicked(x, y):
240 if YELLOWRECT.collidepoint( (x, y) ):
241 return YELLOW
242 elif BLUERECT.collidepoint( (x, y) ):
243 return BLUE
244 elif REDRECT.collidepoint( (x, y) ):
245 return RED
246 elif GREENRECT.collidepoint( (x, y) ):
247 return GREEN
248 return None
249
250
251if __name__ == '__main__':

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected