16 lines
606 B
Python
16 lines
606 B
Python
|
|
import curses
|
|||
|
|
|
|||
|
|
difficulty = "Normal"
|
|||
|
|
player = {"x": 0, "y": 0}
|
|||
|
|
camera = {"x": 0, "y": 0}
|
|||
|
|
# objects 从 set 改为 dict:位置 → 物品类型字符串
|
|||
|
|
objects = {}
|
|||
|
|
|
|||
|
|
def init_colors():
|
|||
|
|
curses.start_color()
|
|||
|
|
curses.init_pair(1, curses.COLOR_YELLOW, curses.COLOR_BLACK) # 玩家
|
|||
|
|
curses.init_pair(2, curses.COLOR_GREEN, curses.COLOR_BLACK) # 绿物品
|
|||
|
|
curses.init_pair(5, curses.COLOR_RED, curses.COLOR_BLACK) # 红物品
|
|||
|
|
curses.init_pair(3, curses.COLOR_WHITE, curses.COLOR_BLACK) # 菜单文字
|
|||
|
|
curses.init_pair(4, curses.COLOR_GREEN, curses.COLOR_BLACK) # 标题/提示
|