Commit 45bfe791 by BellCodeEditor

auto save

parent 22090de3
Showing with 4 additions and 4 deletions
import pygame
# 创建窗口
screen = pyimport pygame
from pygame import locals from pygame import locals
import random import random
pygame.init() # 初始化 pygame.init() # 初始化
...@@ -7,9 +9,7 @@ score = 0 ...@@ -7,9 +9,7 @@ score = 0
grid_size = 20 # 格子大小 grid_size = 20 # 格子大小
grid_num_width = 15 # 横向格子数量 grid_num_width = 15 # 横向格子数量
grid_num_height = 25 # 纵向格子数量 grid_num_height = 25 # 纵向格子数量
FPS = 30 FPS = 30game.display.set_mode((460, 500))
# 创建窗口
screen = pygame.display.set_mode((460, 500))
pygame.display.set_caption("俄罗斯方块") pygame.display.set_caption("俄罗斯方块")
clock = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数) clock = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
# 载入素材 # 载入素材
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment