Fabino
Fabian   Nykoping, Sodermanlands Lan, Sweden
 
 
未提供信息。
当前离线
最喜爱的游戏
2,916
已游戏的小时数
最喜爱的组
GTA - HCB1 - 公共组
6
名成员
0
游戏中
0
人在线
0
聊天中
截图展柜
Grand Theft Auto V
1 9
WarJaeger 2018 年 10 月 20 日 下午 12:48 
Truck stack = Star trek

WarJaeger 2018 年 10 月 7 日 上午 9:02 
You made this profile? I made this profile :)
Fabino 2018 年 4 月 16 日 上午 5:45 
Tack så mycket Vlad! Tack vare dig kan jag programmera igen :) Ps: ♥♥♥♥ off xD
ToastWithButter 2018 年 4 月 16 日 上午 5:45 
colors = ["red", "green", "yellow", "magenta", "gold", "pink", "silver", "black", "white", "darkblue", "darkgrey"]
for c in colors:
objects.append(Ball(canvas,objects, random.randint(50, 300), random.randint(50, 300), random.randint(15,35), c))

while True:
for o in objects:
o.draw()

tk.update_idletasks()
tk.update()
time.sleep(0.01)

ToastWithButter 2018 年 4 月 16 日 上午 5:45 
class Paddle(GameObject):
def __init__ (self, canvas, color):
super(). __init__ (canvas, 0, color)
self.id = canvas.create_rectangle(0, 0, 100, 10, fill=color)
self.canvas.move(self.id, 200, 300)
self.x = 0
self.canvas.bind_all("<KeyPress-Left>", self.turn_left)
self.canvas.bind_all("<KeyPress-Right>", self.turn_right)

def turn_left(self, evt):
self.x = -8

def turn_right(self, evt):
self.x = 8

def draw(self):
pos = self.canvas.coords(self.id)
if pos[0] + self.x > 0 and pos[2] + self.x < self.canvas_width:
self.canvas.move(self.id, self.x, 0)

self.x=0

tk=Tk()
tk.title("Bounce game")
tk.resizable(0,0)
tk.wm_attributes("-topmost", 1)
canvas = Canvas(tk, width=500, height=400, bd=0, highlightthickness=0)
canvas.pack()
tk.update()

paddle = Paddle(canvas, pink)

objects = []
objects.append(paddle)

ToastWithButter 2018 年 4 月 16 日 上午 5:45 
for g in self.grejsor:
if isinstance(g, Paddle) and self.hit(pos, g):
self.y = -self.y
elif g == self:
pass
elif self.hit(pos, g):
#print()self.color + "hits" + g.color
self.y = -self.y
self.x = -self.x

class Ball(GameObject):
def __init__ (self, canvas, objects, x, y ,size, color):
super(). __init__ (canvas, objects, color)
self.id = canvas.create_oval(x, y, x+size, y+size, fill=color)

class Rectangle(GameObject):
def __init__ (self, canvas, objects, x, y, size, color):
super(). __init__ (canvas, objects, color)
self.id = canvas.create_rect(x, )