v_1.0.1 20uhr05 29-03-2023
This commit is contained in:
parent
b6b68a2fcb
commit
d2d21b9e05
21
main.py
21
main.py
@ -2,33 +2,20 @@
|
||||
import random
|
||||
from os import system, name
|
||||
|
||||
from subprocess import call
|
||||
import sys
|
||||
import termios
|
||||
import tty
|
||||
import keyboard
|
||||
from colorama import Fore, Back, Style
|
||||
|
||||
|
||||
cube_ = 'Würfel-Generator\n'
|
||||
|
||||
system('clear')
|
||||
def cube():
|
||||
|
||||
|
||||
def cube():
|
||||
entry = 99
|
||||
while entry != 2:
|
||||
try:
|
||||
#system('clear')
|
||||
print('\x1b[H\x1b[1;14H ', cube_)
|
||||
|
||||
entry = int(input('\x1b[H\x1b[B\x1b[B1 drücken zum Würfeln.\n2 drücken zum beenden.\n'))
|
||||
print('\n')
|
||||
if entry == 1:
|
||||
system('clear')
|
||||
#print(Fore.RED)
|
||||
print('\x1b[8;12HDu hast eine \x1b[1;33m%d\x1b[1;0m gewürfelt' %random.randint(1, 6))
|
||||
|
||||
#print("123 %d hajsishib" %random.randint(1, 6))
|
||||
print('\x1b[8;12HDu hast eine \x1b[1;33m%d\x1b[1;0m gewürfelt' % random.randint(1, 6))
|
||||
elif entry == 0:
|
||||
print('\n')
|
||||
system('clear')
|
||||
@ -53,6 +40,4 @@ def cube():
|
||||
print("entry =", entry)
|
||||
|
||||
|
||||
|
||||
cube()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user