refactor code structure

This commit is contained in:
2025-01-31 19:35:09 +08:00
parent d74c866caf
commit 823158a8eb
4 changed files with 69 additions and 66 deletions

18
module/__init__.py Normal file
View File

@@ -0,0 +1,18 @@
WIDTH, HEIGHT = 800, 600
# 颜色定义
COLORS = {
"air": (0, 191, 255),
"grass": (34, 139, 34),
"dirt": (139, 69, 19),
"stone": (128, 128, 128),
"sand": (238, 232, 170),
"water": (0, 0, 255),
"player": (255, 0, 0)
}
# 游戏参数
BLOCK_SIZE = 20
GRAVITY = 0.5
PLAYER_SPEED = 5
JUMP_FORCE = -12