What I have is just the start screen, As long as I can get the Quit button working I can probably figure out the rest on my own. I just need the Quit button to close the window and stop the program. y'know, like how a Quit button works.
Here's my current code
import turtle
import random
#Functions
#Create Buttons
#n=name
#t=text
#ts=textsize
#x=xcoord (center)
#y=ycoord (center)
#w=width
#h=height
def Create_Button(n,t,ts,x,y,w,h):
n = turtle.Turtle()
n.color('white','black')
n.speed(0)
n.width(5)
n.up()
n.goto(x,y)
n.bk(w//2)
n.rt(90)
n.down()
n.fd(h//2)
n.lt(90)
n.fd(w)
n.lt(90)
n.fd(h)
n.lt(90)
n.fd(w)
n.lt(90)
n.fd(h//2)
n.up()
n.hideturtle()
n.goto(x,y-h/3)
n.write(t, align='center',font=('Courier',ts,'bold'))
#n.shape('square')
#n.goto(x,y)
#n.shapesize(stretch_wid=20, stretch_len=6)
#n.showturtle()
return n
#Title
def Title():
Title = turtle.Turtle()
Title.speed(0)
Title.penup()
Title.color('white')
Title.goto(0,400)
Title.write('Rock, Paper, Scissors!', align='center', font=('Courier', 64, 'bold' ,'italic'))
Title.hideturtle()
# Window
win = turtle.Screen()
win.title('Rock, Paper, Scissors!')
win.bgcolor('black')
win.setup(800,600)
win.tracer(0)
win.listen()
#Title
Title()
#Start Button
Start_Button = Create_Button('Start_Button','Start',64,-250,-250,400,120)
#Quit Button
Quit_Button = Create_Button('Quit_Button','Quit',64,250,-250,400,120)
#Game Loop
while True:
win.update()
I've tried just messing with things myself, and using some solutions from ChatGPT but nothing has worked.