Click detection python
Hello, I am in the path to creating a tic tac toe game, in another day or two, each day full time, because i am a beginner, My question is, in this code: import pygame from pygame.locals import * pygame.init() screen = pygame.display.set_mode((600, 600),0,32) background = pygame.image.load("bg.png").convert_alpha() image1 = pygame.image.load("test.png").convert_alpha() image2 = pygame.image.load("test.png").convert_alpha() image3 = pygame.image.load("test.png").convert_alpha() image4 = pygame.image.load("test.png").convert_alpha() image5 = pygame.image.load("test.png").convert_alpha() image6 = pygame.image.load("test.png").convert_alpha() image7 = pygame.image.load("test.png").convert_alpha() image8 = pygame.image.load("test.png").convert_alpha() image9 = pygame.image.load("test.png").convert_alpha() screen.blit(background, (0,0)) #screen.blit(image1, (0, 0)) #screen.blit(image2, (200, 0)) #screen.blit(image3, (400, 0)) #screen.blit(image4, (0, 200)) #screen.blit(image5, (0, 400)) #screen.blit(image6, (200, 200)) #screen.blit(image7, (200, 400)) #screen.blit(image8, (400, 200)) #screen.blit(image9, (400, 400)) pygame.display.update() a = input("Type anything to exit") quit() Its near to chess, but thats not what i want. What i want is, is that wherever i click, i want it you print/etc the x or y of where i clicked, Hope you understood my question.