Fix Python 3 incompatibility

This commit is contained in:
Nguyễn Gia Phong 2018-05-22 20:44:22 +07:00
parent eace9a270b
commit 8e6faa6d26
4 changed files with 5 additions and 4 deletions

View File

@ -69,6 +69,7 @@ TANGO = {'Butter': ((252, 233, 79), (237, 212, 0), (196, 160, 0)),
'ScarletRed': ((239, 41, 41), (204, 0, 0), (164, 0, 0)),
'Aluminium': ((238, 238, 236), (211, 215, 207), (186, 189, 182),
(136, 138, 133), (85, 87, 83), (46, 52, 54))}
TANGO_VALUES = list(TANGO.values())
ENEMIES = ['Butter', 'Orange', 'Chocolate', 'Chameleon',
'SkyBlue', 'Plum', 'ScarletRed']
COLOR_CODE = ascii_lowercase + '0'

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with Brutal Maze. If not, see <https://www.gnu.org/licenses/>.
__version__ = '0.7.1'
__version__ = '0.7.3'
import re
from argparse import ArgumentParser, FileType, RawTextHelpFormatter

View File

@ -29,7 +29,7 @@ from .characters import Hero, new_enemy
from .constants import (
EMPTY, WALL, HERO, ENEMY, ROAD_WIDTH, MAZE_SIZE, MIDDLE, INIT_SCORE,
ENEMIES, MINW, MAXW, SQRT2, SFX_SPAWN, SFX_SLASH_ENEMY, SFX_LOSE,
ADJACENTS, TANGO, BG_COLOR, FG_COLOR, CELL_WIDTH, LAST_ROW,
ADJACENTS, TANGO_VALUES, BG_COLOR, FG_COLOR, CELL_WIDTH, LAST_ROW,
HERO_HP, ENEMY_HP, ATTACK_SPEED, HERO_SPEED, BULLET_LIFETIME)
from .misc import round2, sign, around, regpoly, fill_aapolygon, play
from .weapons import Bullet
@ -148,7 +148,7 @@ class Maze:
def get_color(self):
"""Return color of a grid."""
return choice(TANGO.values())[0] if self.glitch > 0 else FG_COLOR
return choice(TANGO_VALUES)[0] if self.glitch > 0 else FG_COLOR
def draw(self):
"""Draw the maze."""

View File

@ -7,7 +7,7 @@ with open('README.rst') as f:
setup(
name='brutalmaze',
version='0.7.1',
version='0.7.3',
description='A minimalist TPS game with fast-paced action',
long_description=long_description,
url='https://github.com/McSinyx/brutalmaze',