This commit is contained in:
Michael S. 2023-11-29 19:13:48 +01:00
parent 7d02d6c892
commit 19ec652ddf

View file

@ -1,6 +1,8 @@
#!/usr/bin/python3 #!/usr/bin/python3
from random import randint from random import randint
from time import sleep from time import sleep
from os import get_terminal_size
x,y = get_terminal_size().columns,get_terminal_size().lines
## variablen ## variablen
zeichen = "%-+#$~" zeichen = "%-+#$~"
slots = [["a","b","c"], #slot 1 slots = [["a","b","c"], #slot 1
@ -10,14 +12,16 @@ slots = [["a","b","c"], #slot 1
## funtionen ## funtionen
def pslots(): def pslots():
tren = "+-----------+" tren = "+-----------+"
pr = "| " halb = int(x/2)-5
space = "-"*halb
pr = f"{space}| "
for b in range(0,3): for b in range(0,3):
for a in range(0,3): for a in range(0,3):
pr += slots[a][b]+" " pr += slots[a][b]+" "
pr += "|\n| " pr += f"|\n{space}| "
print(tren) print(space+tren)
print(pr[:-4]) print(pr[:-(space[:-3])])
print(tren) print(space+tren)
def roll_slot(slots,slot=int,new_zeichen=str): def roll_slot(slots,slot=int,new_zeichen=str):
back = slots[slot] back = slots[slot]