All I'm asking for is your overall opinion of how it was done and how it works.
Not good. Your code breaks almost any rule generally agreed about good code. But don't be sad, you are lucky because you can now learn some good principles and write better code in the future.
from turtle import *
import time
from random import *
from tkinter import *
Please do not use import *
, instead use import long_long_name as short
crtanje2(x, y)
and crtanje(br, boja)
are 50 lines long. Divide them in smaller functions.
Remove the following because it is never used.
def mj(x, y):
return x, y
global pon
global m
global klik
global tocnih
Do not use globals, instead pass the variables you need to the function as parametre.
Here code written in the English language is the most welcome, yours isn't, please consider translating your function names to English.
pu()
lt(90)
fd(37.5)
lt(90)
fd(25)
rt(180)
pd()
Your code uses a great deal of two letters names, longer names are generally preferred.
It is common practice to define a main
function that actually does stuff and then do:
if __name__ == "__main__":
main()
so that you can then import
your module.
You are giving the programme all the info to draw the images by itself, this is quite time consuming and very hard to change.
Use the right tool for the right job
Pygame supports sprite (a fancy term for image) loading so you can have a resources folder with all the images of the objects that you want to draw and you can change them anytime.