I\'m making the Towers of Hanoi.
It should work like this: you click on the first tower, from where you want a disk to move, and then on the second where you want the d
What I would personally do is put a loop around your code...
clicklocations = []
for clicknumber in range(0,1):
# get the position of the mouse click
for event in pygame.event.get():
if event.type == MOUSEBUTTONDOWN:
mousex, mousey = pygame.mouse.get_pos()
clicklocations.append([mousex, mousey])
# code for left part of the screen
if clicklocations[0] in left part of screen, do stuff etc. etc.
# code for middle part of the screen
# code for right part of the screen
Something like this.
Then, you'll have both click locations stored and won't have to rewrite your clicking code twice.