统一变量命名风格
This commit is contained in:
parent
6c2595d35c
commit
05770cf502
@ -155,12 +155,12 @@ class Map():
|
||||
elif self.background_type in c.ON_ROOF_BACKGROUNDS:
|
||||
x -= c.MAP_ROOF_OFFSET_X
|
||||
y -= c.MAP_ROOF_OFFSET_X
|
||||
gridX = x // c.GRID_ROOF_X_SIZE
|
||||
if gridX >= 5:
|
||||
gridY = y // c.GRID_ROOF_Y_SIZE
|
||||
grid_x = x // c.GRID_ROOF_X_SIZE
|
||||
if grid_x >= 5:
|
||||
grid_y = y // c.GRID_ROOF_Y_SIZE
|
||||
else:
|
||||
gridY = (y - 20*(6 - gridX)) // 85
|
||||
return (gridX, gridY)
|
||||
grid_y = (y - 20*(6 - grid_x)) // 85
|
||||
return (grid_x, grid_y)
|
||||
else:
|
||||
x -= c.MAP_OFFSET_X
|
||||
y -= c.MAP_OFFSET_Y
|
||||
|
||||
@ -376,7 +376,7 @@ PLANT_CARD_INFO = (# 元组 (植物名称, 卡片名称, 阳光, 冷却时间)
|
||||
)
|
||||
|
||||
# 卡片中的植物名称与索引序号的对应关系,指定名称以得到索引值
|
||||
PLANT_CARD_INDEX={item[PLANT_NAME_INDEX]: index for (index, item) in enumerate(PLANT_CARD_INFO)}
|
||||
PLANT_CARD_INDEX = {item[PLANT_NAME_INDEX]: index for (index, item) in enumerate(PLANT_CARD_INFO)}
|
||||
|
||||
# 指定了哪些卡可选(排除坚果保龄球特殊植物)
|
||||
CARDS_TO_CHOOSE = range(len(PLANT_CARD_INFO) - 3)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user