MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / hit_bat2

Method hit_bat2

DemoPrograms/Demo_Pong_Multiple_Platforms.py:73–78  ·  view source on GitHub ↗
(self, pos)

Source from the content-addressed store, hash-verified

71 return False
72
73 def hit_bat2(self, pos):
74 bat_pos = (self.bat_2.curx, self.bat_2.cury)
75 if pos[0] >= bat_pos[0] and pos[0] <= bat_pos[0]+BAT_SIZE[0]:
76 if bat_pos[1] <= pos[1] <= bat_pos[1]+BAT_SIZE[1]:
77 return True
78 return False
79
80 def draw(self):
81 self.curx += self.x

Callers 1

drawMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected