def ResetGame(grid, man): man = Bomberman(2, 4, 1) grid = man.PopulateGridWithPerson(grid) return [grid, man]
TotalScore = 0 max_enemies = 6 brickslimit = 40 # BEGIN GAME while Level <= 3: # DECLARATIONS for each level a = Board(42, 84, brickslimit, 2, 4) b = a.CreateEmptyBoard() b = a.PopulateBoardWithWalls(b) b = a.PopulateBoardWithBricks(b) man = Bomberman(2, 4, 1) b = man.PopulateGridWithPerson(b) b = a.PopulateBoardWithEnemies(b, max_enemies) enemies = len(a.enemies) count = 0 detonation = 0 # Used as a detonator for the bomb Active = 0 # Indicates whether the bomb is active or not move_type = 0 # Indicates the type of move score = 0 # Indicates the score of each level flag = 0 Resetflag = 0 # Used to call ResetGame function NextInput = time.time() + 1 ''' This is a flag used to allow Synchronous motion of the enemies and bomb detonation ''' Synchronous = 0 Timer = 200