代码拉取完成,页面将自动刷新
import pygame
from blocktype import BlockType
class ResManager:
def __init__(self):
self.image_dict = {}
self.load_images()
self.board_bg = pygame.image.load("img/starsky.png")
def load_images(self):
"""
"L": "blue.png",
"S": "red.png",
"Z": "yellow.png",
"J": "purple.png",
"I": "cyan.png",
"T": "green.png",
"O": "red.png",
"""
self.image_dict["L"] = \
pygame.image.load("img/" + BlockType.images.get("L"))
self.image_dict["S"] = \
pygame.image.load("img/" + BlockType.images.get("S"))
self.image_dict["Z"] = \
pygame.image.load("img/" + BlockType.images.get("Z"))
self.image_dict["J"] = \
pygame.image.load("img/" + BlockType.images.get("J"))
self.image_dict["I"] = \
pygame.image.load("img/" + BlockType.images.get("I"))
self.image_dict["T"] = \
pygame.image.load("img/" + BlockType.images.get("T"))
self.image_dict["O"] = \
pygame.image.load("img/" + BlockType.images.get("O"))
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。