import tkinter as tk
import random

def draw_coin(canvas, x, y, value, color):
    diameter = 30
    radius = diameter // 2
    
    canvas.create_oval(
        x - radius, y - radius,
        x + radius, y + radius,
        fill=color,
        outline="gray"
    )
    
    canvas.create_text(
        x, y,
        text=str(value),
        font=("Arial", 12, "bold")
    )

def coins():
    window = tk.Tk()
    window.title("Mince")
    
    width = 400
    height = 300
    canvas = tk.Canvas(window, width=width, height=height, bg="white")
    canvas.pack()
    
    coin_values = [1, 2, 5, 10, 20, 50]
    colors = ['silver', 'gold', 'white']
    
    for _ in range(10):
        x = random.randint(30, width-30)
        y = random.randint(30, height-30)
        value = random.choice(coin_values)
        color = random.choice(colors)
        draw_coin(canvas, x, y, value, color)
    
    window.mainloop()

if __name__ == "__main__":
    coins()
