Fixed dependencies of NotValidState on the Game class.
This commit is contained in:
4
game.py
4
game.py
@@ -12,7 +12,6 @@ from intro import IntroState
|
|||||||
from menu import MenuState
|
from menu import MenuState
|
||||||
from ingame import InGameState
|
from ingame import InGameState
|
||||||
from score import ScoreState
|
from score import ScoreState
|
||||||
from notvalidstate import NotValidState
|
|
||||||
from constants import DEBUG
|
from constants import DEBUG
|
||||||
|
|
||||||
# The Game class implements the state machine of the game and
|
# The Game class implements the state machine of the game and
|
||||||
@@ -30,10 +29,9 @@ class Game:
|
|||||||
menu = MenuState()
|
menu = MenuState()
|
||||||
in_game = InGameState()
|
in_game = InGameState()
|
||||||
score = ScoreState()
|
score = ScoreState()
|
||||||
not_valid = NotValidState()
|
|
||||||
|
|
||||||
# Create a states list.
|
# Create a states list.
|
||||||
self.state_vector = [intro, menu, in_game, score, not_valid]
|
self.state_vector = [intro, menu, in_game, score]
|
||||||
|
|
||||||
def get_state(self):
|
def get_state(self):
|
||||||
""" Returns the current state of the game. """
|
""" Returns the current state of the game. """
|
||||||
|
@@ -149,7 +149,7 @@ class ParticleSystem:
|
|||||||
float(random.randrange(-self.initial_velocity_max, self.initial_velocity_max))]
|
float(random.randrange(-self.initial_velocity_max, self.initial_velocity_max))]
|
||||||
particle = Particle(
|
particle = Particle(
|
||||||
int(self.lifespan),
|
int(self.lifespan),
|
||||||
max(min(random.random(), 1.0), 0.5),
|
max(min(random.random(), 1.0), 0.2),
|
||||||
self.texture,
|
self.texture,
|
||||||
list(self.gravity),
|
list(self.gravity),
|
||||||
list(self.position),
|
list(self.position),
|
||||||
|
Reference in New Issue
Block a user