ammmmmmmmmm

This commit is contained in:
Michael S. 2023-11-06 16:13:41 +01:00
parent 884af776fc
commit 20d4a8f432
3 changed files with 51 additions and 13 deletions

View file

@ -0,0 +1,22 @@
from os import get_terminal_size
class tengine():
tx, ty = get_terminal_size().columns, get_terminal_size().lines
#feld = [[""]*10]*10
feld = [["","","",],["","","",],["","","",]]
test = 0
for a in feld:
for b in a:
print(test)
b = test
test +=1
print(feld)
def strfeld():
back = ""
for a in tengine.feld:
for b in a:
back += b
back += "\n"
return back
def addchar(character=str,position=list):
tengine.feld[2][2] = "a"

15
terminal engine/test.py Normal file
View file

@ -0,0 +1,15 @@
#from tengine import tengine
#tengine.addchar("a",[5,5])
#print(tengine.feld)
feld = [["","","",],["","","",],["","","",]]
feld[1][1] = "a"
test = 0
for a in feld:
for b in a:
print(test)
b = test
print(b)
test +=1
feld[1][1] = "a"
print(feld)

7
v1.py
View file

@ -3,12 +3,14 @@ import os
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:
@ -21,9 +23,8 @@ def on_release(key):
# Stop listener
running = "finito"
listener = keyboard.Listener(
on_press=on_press,
on_release=on_release)
listener = keyboard.Listener(on_press=on_press, on_release=on_release)
listener.start()