-
-
Save parzibyte/862fedbb3ade93eb77a1ab953065aec7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Una clase que representa el cuadro. El mismo tiene una imagen y puede estar | |
descubierto (cuando ya lo han descubierto anteriormente y no es la tarjeta buscada actualmente) | |
o puede estar mostrado (cuando se voltea la imagen) | |
También tiene una fuente o nombre de imagen que servirá para compararlo más tarde | |
""" | |
class Cuadro: | |
def __init__(self, fuente_imagen): | |
self.mostrar = True | |
self.descubierto = False | |
""" | |
Una cosa es la fuente de la imagen (es decir, el nombre del archivo) y otra | |
la imagen lista para ser pintada por PyGame | |
La fuente la necesitamos para más tarde, comparar las tarjetas | |
""" | |
self.fuente_imagen = fuente_imagen | |
self.imagen_real = pygame.image.load(fuente_imagen) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment