add ascii.py
This commit is contained in:
parent
fc97cb0c76
commit
1e5937a621
6 changed files with 11 additions and 18 deletions
Binary file not shown.
|
@ -2,6 +2,9 @@
|
|||
from os import get_terminal_size
|
||||
tx,ty = get_terminal_size().columns ,get_terminal_size().lines-2
|
||||
|
||||
def clear():
|
||||
print('\033c', end='')
|
||||
|
||||
class tengine():
|
||||
def __init__(self) -> 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)):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue