subprocess.call(argsv) elif option == 'ul': print('Downloading the latest repo ... ', end='') pack.download('latest') pack.unpack('/app/cache/gets/latest.pa') print('done') elif option == 'crt': if sys.argv[2:] == []: colors.show('paye', 'fail', 'no inputs.') sys.exit(0) crtype = sys.argv[2] if sys.argv[3:] == []: crname = 'untitled' else: crname = sys.argv[3] if not files.isdir(crname): files.mkdir(crname) if crtype == 'gui': cmd.unzip([res.get('@temp/simple-gui-project.zip'), crname]) elif crtype == 'web': cmd.unzip([res.get('@temp/simple-web-project.zip'), crname]) else: cmd.unzip([res.get('@temp/simple-project.zip'), crname]) else: colors.show("paye", "fail", option + ": option not found.")
win.blit(t_s2, (270, 270)) t_s = font.render("Your score is : " + str(score), True, (0, 255, 0)) win.blit(t_s, (270, 320)) pygame.display.update() time.sleep(3) game_over = True break if p_pos[0] <= 0: p_pos[0] = 0 if p_pos[0] >= 740: p_pos[0] = 740 # if (e_pos[1] >= 0) and (e_pos[1] <= 600): # e_pos[1] += speed_e # else: # e_pos[1] = 0 # e_pos[0] = random.randint(0, 740) win.fill(blue) enemies(enemy_l) draw_enemies(enemy_l) score = enemy_pos_update(enemy_l, score) t_s = font.render("score : " + str(score), True, (0, 255, 0)) win.blit(t_s, (20, 20)) speed_e = level(score, speed_e) img1 = pygame.image.load(res.get("@icon/catball")) img1 = pygame.transform.scale(img1, (60, 60)) win.blit(img1, (p_pos[0], p_pos[1], 60, 60)) clock.tick(fps) pygame.display.update()
# Git source: github.com/PyFarsi/pyabr # ####################################################################################### from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * from libabr import Files, Control, Res files = Files() control = Control() res = Res() import random import time IMG_BOMB = QImage(res.get(res.etc("mines", 'bug'))) IMG_FLAG = QImage(res.get(res.etc("mines", 'flag'))) IMG_START = QImage(res.get(res.etc("mines", 'rocket'))) IMG_CLOCK = QImage(res.get(res.etc("mines", 'clock-select'))) NUM_COLORS = { 1: QColor(res.etc("mines", 'color1')), 2: QColor(res.etc("mines", 'color2')), 3: QColor(res.etc("mines", 'color3')), 4: QColor(res.etc("mines", 'color4')), 5: QColor(res.etc("mines", 'color5')), 6: QColor(res.etc("mines", 'color6')), 7: QColor(res.etc("mines", 'color7')), 8: QColor(res.etc("mines", 'color8')) }