I'm trying to build the snake game using turtle (python module). I've created the window and the snakehead so far. The background color of the window is white. I want it to be blue. How do I change it? Thank you
Code:
import turtle
#set up the screen
wn = turtle.Screen()
wn.title("snake game")
wn.bgcolor()
wn.setup(width=600, height=600)
wn.tracer(0)
#Snake Head
head = turtle.Turtle()
head.speed(0)
head.shape("square")
head.color("green")
head.penup()
head.goto(0, 0)
head.direction = "stop"
# Main game loop
while True:
wn.update()
turtle.mainloop()