Fix Python 3 incompatibility
This commit is contained in:
parent
eace9a270b
commit
8e6faa6d26
|
@ -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)),
|
'ScarletRed': ((239, 41, 41), (204, 0, 0), (164, 0, 0)),
|
||||||
'Aluminium': ((238, 238, 236), (211, 215, 207), (186, 189, 182),
|
'Aluminium': ((238, 238, 236), (211, 215, 207), (186, 189, 182),
|
||||||
(136, 138, 133), (85, 87, 83), (46, 52, 54))}
|
(136, 138, 133), (85, 87, 83), (46, 52, 54))}
|
||||||
|
TANGO_VALUES = list(TANGO.values())
|
||||||
ENEMIES = ['Butter', 'Orange', 'Chocolate', 'Chameleon',
|
ENEMIES = ['Butter', 'Orange', 'Chocolate', 'Chameleon',
|
||||||
'SkyBlue', 'Plum', 'ScarletRed']
|
'SkyBlue', 'Plum', 'ScarletRed']
|
||||||
COLOR_CODE = ascii_lowercase + '0'
|
COLOR_CODE = ascii_lowercase + '0'
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# 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/>.
|
# along with Brutal Maze. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
__version__ = '0.7.1'
|
__version__ = '0.7.3'
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from argparse import ArgumentParser, FileType, RawTextHelpFormatter
|
from argparse import ArgumentParser, FileType, RawTextHelpFormatter
|
||||||
|
|
|
@ -29,7 +29,7 @@ from .characters import Hero, new_enemy
|
||||||
from .constants import (
|
from .constants import (
|
||||||
EMPTY, WALL, HERO, ENEMY, ROAD_WIDTH, MAZE_SIZE, MIDDLE, INIT_SCORE,
|
EMPTY, WALL, HERO, ENEMY, ROAD_WIDTH, MAZE_SIZE, MIDDLE, INIT_SCORE,
|
||||||
ENEMIES, MINW, MAXW, SQRT2, SFX_SPAWN, SFX_SLASH_ENEMY, SFX_LOSE,
|
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)
|
HERO_HP, ENEMY_HP, ATTACK_SPEED, HERO_SPEED, BULLET_LIFETIME)
|
||||||
from .misc import round2, sign, around, regpoly, fill_aapolygon, play
|
from .misc import round2, sign, around, regpoly, fill_aapolygon, play
|
||||||
from .weapons import Bullet
|
from .weapons import Bullet
|
||||||
|
@ -148,7 +148,7 @@ class Maze:
|
||||||
|
|
||||||
def get_color(self):
|
def get_color(self):
|
||||||
"""Return color of a grid."""
|
"""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):
|
def draw(self):
|
||||||
"""Draw the maze."""
|
"""Draw the maze."""
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open('README.rst') as f:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='brutalmaze',
|
name='brutalmaze',
|
||||||
version='0.7.1',
|
version='0.7.3',
|
||||||
description='A minimalist TPS game with fast-paced action',
|
description='A minimalist TPS game with fast-paced action',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
url='https://github.com/McSinyx/brutalmaze',
|
url='https://github.com/McSinyx/brutalmaze',
|
||||||
|
|
Loading…
Reference in New Issue