I\'m new in python. I\'m trying to achieve a simple object movement on canvas.
The idea is to simply update X, Y coordinates and redraw the oval.
I\'ve tried
Instead of character.x += 10 or character.y -= 10, you need to use move:
character.x += 10
character.y -= 10
move
canvas.move(oval, 10, 0) # for x += 10 canvas.move(oval, 0, -10) # for y -= 10
The rest should follow.
Instead of a Character class, you can just say oval = canvas.create_oval(x, y, x + 40, y + 40, fill=color).
Character
oval = canvas.create_oval(x, y, x + 40, y + 40, fill=color)