Original Post
Hello. I am working on a game in python which is based off a tutorial by Lusikkamage. I have almost finished it but when I try and use collision between the player and the grass it doesn't work. When you move the player with the mouse the grass scatters all over the screen. I imported random and tried to make it work but nothing is working. HELP PLEASE. P.S. I use pygame with python, here is the code. Thanks
if (playerRect.colliderect(grassRect)):
Gx = random.randint(1,640)
Gy = random.randint(1,480)
screen.blit(grass, (Gx, Gy))