moved functions to its own file
This commit is contained in:
parent
4cdeff7c26
commit
d92a2a7c49
2 changed files with 22 additions and 15 deletions
16
ben10.py
16
ben10.py
|
@ -1,24 +1,10 @@
|
|||
from tkinter import *
|
||||
from aliens import alien_table
|
||||
|
||||
from functions import *
|
||||
root = Tk()
|
||||
|
||||
root.title("Omnitrix")
|
||||
# root.attributes('-fullscreen', True)
|
||||
counter= 0
|
||||
|
||||
def count_up():
|
||||
global counter
|
||||
counter+= 1
|
||||
# print(counter)
|
||||
|
||||
def count_down():
|
||||
global counter
|
||||
counter-= 1
|
||||
# print(counter)
|
||||
|
||||
def transform():
|
||||
print(alien_table(counter))
|
||||
|
||||
root.geometry("640x480")
|
||||
root.configure(bg="#70b607")
|
||||
|
|
21
functions.py
Normal file
21
functions.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
from aliens import alien_table
|
||||
|
||||
counter= 0
|
||||
|
||||
def count_up():
|
||||
global counter
|
||||
counter+= 1
|
||||
# print(counter)
|
||||
|
||||
def count_down():
|
||||
global counter
|
||||
counter-= 1
|
||||
# print(counter)
|
||||
|
||||
def transform():
|
||||
if counter < 0:
|
||||
print(alien_table(counter * -1))
|
||||
elif counter == 0:
|
||||
print(alien_table(counter))
|
||||
elif counter > 0:
|
||||
print(alien_table(counter))
|
Loading…
Add table
Reference in a new issue