Beispiel #1
0
                MOVE_TYPE = 0
                FLAG = 0
        if SYNCHRONOUS == 1:
            SYNCHRONOUS = 0
            NEXTINPUT = time.time() + 1
            if ACTIVE == 1:
                FLAG = 0
                DETONATION += 1
                BOX = MAN.active[0].check_if_time(GRID, DETONATION,
                                                  [ENEMIES, 1], SCORE)
                GRID = BOX[0]
                SCORE = BOX[5]
                if BOX[3] == []:
                    MAN.active[0].set_detonation(
                        MAN.active[0].get_detonation() - 1)
                    MAN.set_detonation(MAN.get_detonation() - 1)
                    if MOVE_TYPE != 1:
                        GRID = MAN.active[0].clear_grid_of_person(GRID, 1)
                if BOX[3]:
                    ACTIVE = -1
                    if BOX[2] == 0:
                        FLAG = 1
                    for num in BOX[4]:
                        BOARD.remove_enemy_from_list(num[0], num[1])
                        SCORE += 100
                        ENEMIES -= 1
            if check_to_end(MAX_LIFES, ENEMIES) == 1:
                break

        SYNCHRONOUS = 0
        RESETFLAG = 0
Beispiel #2
0
            blasted and we need to clear the blast area
        '''
        if Synchronous == 1:
            Synchronous = 0
            NextInput = time.time() + 1
            if Active == 1:
                flag = 0
                detonation += 1
                Box = man.activeBombs[0].CheckIfTime(b, detonation, enemies, 1,
                                                     score)
                b = Box[0]
                score = Box[5]
                if len(Box[3]) == 0:
                    man.activeBombs[0].set_detonation(
                        man.activeBombs[0].get_detonation() - 1)
                    man.set_detonation(man.get_detonation() - 1)
                    if move_type != 1:
                        b = man.activeBombs[0].ClearGridOfPerson(b, 1)
                if len(Box[3]) != 0:
                    Active = -1
                    if Box[2] == 0:
                        flag = 1
                    for num in Box[4]:
                        a.RemoveEnemyFromList(num[0], num[1])
                        score += 100
                        enemies -= 1
            if CheckToEnd(max_lifes, enemies) == 1:
                break

        # INPUTPART
        Synchronous = 0