Hallo Leute,
Hier ist schon mal die erste Version meines Online Spiels. Momentan kann man allerdings nur im Singleplayer Modus Spielen.
c.move(ich, int("-" + str(w)), 0)
c.move(ich, 0, int("-" + str(w)))
#print(str(x) + " " + str(y)) kordinaten output
root.title("Zenos MultiplayerSpiel")
c = Canvas(root, height=500, width=700)
ich = c.create_oval(40, 40, 60, 60, fill="black")
c.bind_all('<Right>', rechts)
c.bind_all('<Left>', links)
c.bind_all('<Down>', unten)
from tkinter import *
w = 10
x = 40
y = 40
def rechts(event):
global x
x = x + w
c.move(ich, w, 0)
def links(event):
global x
x = x - w
c.move(ich, int("-" + str(w)), 0)
def unten(event):
global y
y = y + w
c.move(ich, 0, w)
def oben(event):
global y
y = y - w
c.move(ich, 0, int("-" + str(w)))
#print(str(x) + " " + str(y)) kordinaten output
root = Tk()
root.title("Zenos MultiplayerSpiel")
c = Canvas(root, height=500, width=700)
c.pack()
ich = c.create_oval(40, 40, 60, 60, fill="black")
c.bind_all('<Right>', rechts)
c.bind_all('<Left>', links)
c.bind_all('<Up>', oben)
c.bind_all('<Down>', unten)
mainloop()
from tkinter import *
w = 10
x = 40
y = 40
def rechts(event):
global x
x = x + w
c.move(ich, w, 0)
def links(event):
global x
x = x - w
c.move(ich, int("-" + str(w)), 0)
def unten(event):
global y
y = y + w
c.move(ich, 0, w)
def oben(event):
global y
y = y - w
c.move(ich, 0, int("-" + str(w)))
#print(str(x) + " " + str(y)) kordinaten output
root = Tk()
root.title("Zenos MultiplayerSpiel")
c = Canvas(root, height=500, width=700)
c.pack()
ich = c.create_oval(40, 40, 60, 60, fill="black")
c.bind_all('<Right>', rechts)
c.bind_all('<Left>', links)
c.bind_all('<Up>', oben)
c.bind_all('<Down>', unten)
mainloop()