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

Function keyup

PONG_GAME.py:137–142  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

135
136
137def keyup(key):
138 global paddle1_vel, paddle2_vel
139 if key == simplegui.KEY_MAP["down"] or key == simplegui.KEY_MAP["up"]:
140 paddle1_vel = 0
141 if key == simplegui.KEY_MAP["w"] or key == simplegui.KEY_MAP["s"]:
142 paddle2_vel = 0
143
144
145frame = simplegui.create_frame("Pong", WIDTH, HEIGHT)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected