From 1e5937a6212c09b99737cdd9374d3e7940bbead3 Mon Sep 17 00:00:00 2001 From: Megamichi Date: Wed, 17 Jan 2024 19:15:14 +0100 Subject: [PATCH] add ascii.py --- __pycache__/ascii.cpython-311.pyc | Bin 691 -> 695 bytes .../__pycache__/parabelfunc.cpython-311.pyc | Bin 3739 -> 3743 bytes tengine/__pycache__/main.cpython-311.pyc | Bin 4576 -> 4569 bytes tengine/main.py | 7 ++++--- v1.py | 10 +--------- v2.py | 12 ++++++------ 6 files changed, 11 insertions(+), 18 deletions(-) diff --git a/__pycache__/ascii.cpython-311.pyc b/__pycache__/ascii.cpython-311.pyc index 98560fb8a07dbf24cc8bd5bfdf8728911b9ab80a..8a3110887a083b94f9f66addc4e15d7126496b36 100644 GIT binary patch delta 90 zcmdnYx}BA8IWI340}$xlTAccoaU-8Plbx%6Mt*Lper{@dVs2(~My7snaz;^VW>QIJ radL)!a(+r?Ub=o-eo=aARz8qhUYVL&5?_*9l$)8Cn4>>ApUDLPKBOO$ delta 86 zcmdnax|x-4IWI340}!NjE=y%$+Q_HQWaXG_6%$&VT2vh4o0^`Oo0*)E8RL>#oL!P% o5L1;}njVvuUzDDjl^>IwUtXD-S`uH9T9liamzWbXxtPfX0F}BO@Bjb+ diff --git a/physics/__pycache__/parabelfunc.cpython-311.pyc b/physics/__pycache__/parabelfunc.cpython-311.pyc index 5d3403b8c5ebcb0dfb8d6e715037824a5f369c9f..d3f4d4b72dbd718794be66d540b30a123c1dbe59 100644 GIT binary patch delta 98 zcmbO&J71P}IWI340}x23E=?`k$eYCG7ObCu=u3_KF<8{0PjU3B>(^b diff --git a/tengine/__pycache__/main.cpython-311.pyc b/tengine/__pycache__/main.cpython-311.pyc index a955f0365ce2478d0f5e675bafd7b8cd8e7469f5..ef88ba73bd2b9ab171d127b04b9686313d1fe556 100644 GIT binary patch delta 1117 zcmZ`&O=uHA6yDk0Y<@P|B&C%mwn=KK8fg>%TePhfsveZ07Da+k(%m&#n{3M4)W1u6 zC{^$j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(923|quJs8ma^JOkcS(5Px z1-Y=eBkq{1Nr!l1Mj$3{eY!4{A0$;UVye_Y2w#G1vj%R^kS32U6ttR-m;Ea5kNekP zVthTgk>)*Pt^di6wWiI2~(&wBdcUOv=i7F^rNK_NCc#ZdnbID$q z+O1@stP+ot1CV~3{I+H*F!=z&Hh@Jz#(1p`igt*PsXic?>0Xi-8`JmW`S@h!^^sk? zfTYz(A{^)W_mHLG*I1eV9&@}ch-+jW>3;SqeUc>lkPU+sJ+=$S4B7o;P@J_Nfwn~F z^V}9ps~j()bq5xdzU$nV$M+$vivi=zuTEtaXVMOA5!*78y?B#Aw!n<=G;Rpr+cJmH zbci>Z{^1qiw$yJx&qdgYup40y!a;;#1REiKA@Kt>af^T#6}=SOv!_W;+{wDx95M3q z$}cd*)9mj3F%ip03YJvs5!b+%mS3+;PK1#(@ZzKRnee5Mi97#!q$oPe$W?LJIkayR S86oq^zwv7v|NftBEdM9< None: self.screen = [[' ' for _ in range(tx)] for _ in range(ty+2)] @@ -24,7 +27,6 @@ class tengine(): back += line[:tx] + "\n" return back.lstrip('\n').rstrip('\n') - def set_char(self, character, position): self.screen[position[0]][position[1]] = character @@ -38,8 +40,7 @@ class tengine(): pposition = [pposition[0], pposition[1] + 1] self.screen[pposition[0]][pposition[1]] = zeichen - def clear(self): - print('\033c', end='') + def draw_border(self, border_char='+'): for i in range(len(self.screen)): diff --git a/v1.py b/v1.py index eb8390a..e11e296 100644 --- a/v1.py +++ b/v1.py @@ -1,17 +1,9 @@ #!/usr/bin/python3 import os -from forgejo.cowyeet_terminal.tengine.main import ty,tx,clear +from tengine.main import ty,tx,clear from pynput import keyboard from time import sleep - -#def clear(): -# if os.name == "nt": -# os.system("cls") -# else: -# os.system("clear") - - def on_press(key): global running if key == keyboard.Key.space: diff --git a/v2.py b/v2.py index dd44a8c..21d6370 100644 --- a/v2.py +++ b/v2.py @@ -44,7 +44,7 @@ if __name__ == "__main__" and running == True: scene.set_block(ascii.start_screen_text,[ty,int(tx/2-5)]) scene.print() sleep(0.2) - scene.clear() + clear() if key_space == True: while not key_space == False: startscreen = False @@ -52,7 +52,7 @@ if __name__ == "__main__" and running == True: scene.viereck([ty,int(tx/2-4)],11,1," ") scene.print() sleep(0.2) - scene.clear() + clear() if key_space == True: while not key_space == False: startscreen = False @@ -62,7 +62,7 @@ if __name__ == "__main__" and running == True: cows = "🐵🐒🦍🦧🐕🐯🦝🐩🐅🐴🐎🦄🦌🐗🐂🐃🐄🐪🐫🦙🦒🐹🦘🦡🐧🕊️ 🦅🦆🦉🐍🦎🐊🦜🦚🦩🐲🐉🦕" cowlistlength = len(cows) cow = "#" #cows[random.randint(0, cowlistlength - 1)] - scene.clear() + clear() #scene[ty][tx] ### 2zeichen kuhh mach probleme while running == True: wobl = "-" * (tx - wobble_pos - 5) @@ -95,18 +95,18 @@ if __name__ == "__main__" and running == True: wobble_way = "right" sleep(wobble_speed) - scene.clear() + clear() if key_space == True: break points_prozent = int((points/txhalb)*100) - scene.clear() + clear() for a in range(int(points*2)-2): scene.set_block("-"*a+cow,[0,0])#🐄️ scene.set_block(str(points_prozent)+"%",[1,int(tx/2-2)]) scene.print() sleep(0.01) - scene.clear() + clear() scene.print() exit()