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

Method draw

Checker_game_by_dz/modules/pieces.py:37–45  ·  view source on GitHub ↗
(self, window)

Source from the content-addressed store, hash-verified

35 self.king = True
36
37 def draw(self, window):
38 radd = (sq_size // 2) - self.padding
39 pg.draw.circle(window, gray, (self.x, self.y), radd + self.outline)
40 pg.draw.circle(window, self.color, (self.x, self.y), radd)
41 if self.king:
42 window.blit(
43 crown,
44 ((self.x - crown.get_width() // 2), (self.y - crown.get_height() // 2)),
45 )
46
47 def move(self, row, col):
48 self.row = row

Callers 1

updateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected