So I'm coding this game called simon says which is this classic colour memory game. The algorithm is obviously not done yet, but I just don't know how I can get the square to flash. I'm just testing it with the only the blue square.
from tkinter import *
import random
import time
def click():
lightblue_rectangle = w.create_rectangle(483, 480, 683, 680, fill="blue")
window.after(500, click)
blue_rectangle = w.create_rectangle(483, 480, 683, 680, fill="darkblue")
window = Tk()
w = Canvas(window, width=1366, height=766)
w.configure(background = "black")
w.pack()
blue_rectangle = w.create_rectangle(483, 480, 683, 680, fill="darkblue")
red_rectangle = w.create_rectangle(683, 480, 883, 680, fill="red")
yellow_rectangle = w.create_rectangle(483, 280, 683, 480, fill="yellow")
green_rectangle = w.create_rectangle(683, 280, 883, 480, fill="green")
w.tag_bind(blue_rectangle, "<ButtonPress-1>", click)
I get this error that says: click() takes 0 positional arguments but 1 was given. What I am trying to do is make the square flash. I can take care of the random pattern later. I just need help with making the square flash.