2
This commit is contained in:
parent
7d02d6c892
commit
19ec652ddf
1 changed files with 9 additions and 5 deletions
14
casinx.py
14
casinx.py
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue