MCPcopy Index your code
hub / github.com/geekcomputers/Python / draw_cards

Function draw_cards

Memory_game.py:73–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72# Fonction pour dessiner les cartes
73def draw_cards():
74 for idx, pos in enumerate(card_positions):
75 x, y = pos
76 if visible[idx]:
77 pygame.draw.rect(screen, WHITE, pygame.Rect(x, y, CARD_SIZE, CARD_SIZE))
78 display_text(cards[idx], font, PINK, x + 10, y + 30)
79 else:
80 pygame.draw.rect(
81 screen, LIGHT_PINK, pygame.Rect(x, y, CARD_SIZE, CARD_SIZE)
82 )
83 pygame.draw.rect(screen, GREY, pygame.Rect(x, y, CARD_SIZE, CARD_SIZE), 5)
84
85
86# Variables du jeu

Callers 1

Memory_game.pyFile · 0.85

Calls 2

display_textFunction · 0.85
rectMethod · 0.45

Tested by

no test coverage detected