parent
fc5ac7eecf
commit
9f697d8d2f
@ -1,57 +0,0 @@
|
|||||||
#定义基础参数
|
|
||||||
box_size = 100 # 每个小方格的大小
|
|
||||||
line_width = 3 # 小方格边框宽度
|
|
||||||
top_of_screen = 150 # 最上面一行格子到窗口顶端的距离
|
|
||||||
screen_width = 400 # 游戏界面的宽
|
|
||||||
screen_height = 640 # 游戏界面的高度
|
|
||||||
|
|
||||||
one_text_long = int(40/100*box_size)
|
|
||||||
two_text_long = int(32/100*box_size)
|
|
||||||
three_text_long = int(24/100*box_size)
|
|
||||||
four_text_long = int(16/100*box_size)
|
|
||||||
text_distance = int(32/100*box_size)
|
|
||||||
user_text_distance = int(24/100*box_size)
|
|
||||||
start_x = int((screen_width - 4 * box_size)/2)
|
|
||||||
|
|
||||||
|
|
||||||
# 定义颜色
|
|
||||||
BLACK = (0, 0, 0)
|
|
||||||
WHITE = (255, 255, 255)
|
|
||||||
RED = (255, 0, 0)
|
|
||||||
GREEN = (0, 255, 0)
|
|
||||||
BLUE = (0, 0, 255)
|
|
||||||
|
|
||||||
#棋盘块颜色定义
|
|
||||||
block_color = [(255,255,255), #0
|
|
||||||
(255,231,186), #2
|
|
||||||
(255,211,155), #4
|
|
||||||
(255,140,105), #8
|
|
||||||
(242,66,88) , #16
|
|
||||||
(232,102,184), #32
|
|
||||||
(188,0,204) , #64
|
|
||||||
(153,255,51) , #128
|
|
||||||
(0,255,51) , #256
|
|
||||||
(116,0,255) , #512
|
|
||||||
(0,113,130) , #1024
|
|
||||||
(0,255,255)] #2048
|
|
||||||
|
|
||||||
#字体颜色定义
|
|
||||||
text_color = [ (0,0,0), #2
|
|
||||||
(0,0,0), #4
|
|
||||||
(0,0,0), #8
|
|
||||||
(255,255,0) , #16
|
|
||||||
(124,252,0), #32
|
|
||||||
(173,255,47) , #64
|
|
||||||
(72,61,139) , #128
|
|
||||||
(0,0,205) , #256
|
|
||||||
(255,246,143) , #512
|
|
||||||
(255,215,0) , #1024
|
|
||||||
(255,69,0)] #2048
|
|
||||||
|
|
||||||
#背景颜色定义
|
|
||||||
BACKGROUND_COLOR = (176,224,230)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue