comparison pytouhou/game/game.pyx @ 465:5f5955635d2c

Move continues to PlayerState, and make sure they aren’t reinitialized before each stage.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 11 Sep 2013 16:03:55 +0200
parents 4ccc47828002
children b16d34fca5b4
comparison
equal deleted inserted replaced
464:36bc577b2392 465:5f5955635d2c
24 24
25 25
26 cdef class Game: 26 cdef class Game:
27 def __init__(self, players, long stage, long rank, long difficulty, bullet_types, 27 def __init__(self, players, long stage, long rank, long difficulty, bullet_types,
28 laser_types, item_types, long nb_bullets_max=0, long width=384, 28 laser_types, item_types, long nb_bullets_max=0, long width=384,
29 long height=448, prng=None, interface=None, double continues=0, 29 long height=448, prng=None, interface=None, hints=None):
30 hints=None):
31 self.width, self.height = width, height 30 self.width, self.height = width, height
32 31
33 self.nb_bullets_max = nb_bullets_max 32 self.nb_bullets_max = nb_bullets_max
34 self.bullet_types = bullet_types 33 self.bullet_types = bullet_types
35 self.laser_types = laser_types 34 self.laser_types = laser_types
48 self.faces = [None, None] 47 self.faces = [None, None]
49 self.texts = [None, None, None, None, None, None] 48 self.texts = [None, None, None, None, None, None]
50 self.interface = interface 49 self.interface = interface
51 self.hints = hints 50 self.hints = hints
52 51
53 self.continues = continues
54 self.stage = stage 52 self.stage = stage
55 self.rank = rank 53 self.rank = rank
56 self.difficulty = difficulty 54 self.difficulty = difficulty
57 self.difficulty_counter = 0 55 self.difficulty_counter = 0
58 self.difficulty_min = 12 if rank == 0 else 10 56 self.difficulty_min = 12 if rank == 0 else 10