Skip to content

Commit

Permalink
弃用text_color配置
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeBottle committed Dec 12, 2021
1 parent 7fba1b8 commit 95864fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions src/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,12 @@ def __init__(self, task_list) -> None:
line_head_color = styles['line_head_color']
line_body_color = styles['line_body_color']
border_color = styles['border_color']
text_color = styles['text_color'] # 文字颜色
# 一号颜色对,用于线头
self.set_color(1, line_head_color)
# 二号颜色对,用于边框颜色
self.set_color(2, border_color)
# 三号颜色对,用于线尾
self.set_color(3, line_body_color)
# 四号颜色对,用于文字
self.set_color(4, text_color)

@staticmethod
def set_color(num, rgb_tuple):
Expand Down Expand Up @@ -208,8 +205,7 @@ def over(self): # 游戏结束
self.game_area.erase() # 擦除游戏区域内容
text_h, text_w, over_text = res_ins.art_texts(
'gameover') # 获得艺术字GAME OVER
self.tui.addstr(1, 1, Res.x_offset(
over_text, 1), curses.color_pair(4))
self.tui.addstr(1, 1, Res.x_offset(over_text, 1))
self.msg_area.mvwin(text_h+1, 1) # 移动一下msg区的位置
pattern = '{:-^' + str(text_w) + '}'
result_text = pattern.format('RESULT')
Expand Down
1 change: 0 additions & 1 deletion src/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def __init__(self) -> None:
"line_body_color": (138, 220, 255),
'area_border': '#',
"border_color": (161, 161, 161),
"text_color": (255, 255, 255),
"to_explode": "*", # 即将爆炸的图案
"to_explode_color": (255, 0, 0), # 即将爆炸时闪烁的颜色
"explode": "*", # 爆炸粒子图案
Expand Down

0 comments on commit 95864fd

Please sign in to comment.