Mercurial > touhou
diff pytouhou/game/game.py @ 445:b0abb05811f7
Make pytouhou.game.player an extension type, and move the GameOver exception there since it makes more sense.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 17 Aug 2013 04:44:28 +0200 |
parents | c9433188ffdb |
children | 3a33ed7f3b85 |
line wrap: on
line diff
--- a/pytouhou/game/game.py +++ b/pytouhou/game/game.py @@ -24,11 +24,6 @@ from pytouhou.game.text import Text from pytouhou.game.face import Face - -class GameOver(Exception): - pass - - class Game(object): def __init__(self, players, stage, rank, difficulty, bullet_types, laser_types, item_types, nb_bullets_max=None, width=384, @@ -342,7 +337,7 @@ class Game(object): if not player.state.touchable: continue - px, py = player.x, player.y + px, py = player.state.x, player.state.y phalf_size = player.sht.hitbox px1, px2 = px - phalf_size, px + phalf_size py1, py2 = py - phalf_size, py + phalf_size