diff --git a/src/main.py b/src/main.py index af8c170..bc66a19 100644 --- a/src/main.py +++ b/src/main.py @@ -101,12 +101,21 @@ def main(): elif event.type == pygame.MOUSEBUTTONDOWN: mouse_x , mouse_y= event.pos x = int(mouse_x / WIDTH * 9) + 1 - y = int(mouse_y / HEIGHT * 6) + 1 + y = int(mouse_y / HEIGHT * 7) + 1 b1,b2,b3 = pygame.mouse.get_pressed() print(mouse_x,mouse_y) if status == 1: - fox.x = mouse_x - fox.y = mouse_y + if mouse_x >=800: + fox.x = int((x-1) / 9 * WIDTH) - 10 + fox.y = int((y-1) / 7 * HEIGHT) + elif mouse_x >=600: + fox.x = int((x - 1) / 9 * WIDTH) + fox.y = int((y - 1) / 7 * HEIGHT) + else: + fox.x = int((x - 1) / 9 * WIDTH) + 15 + fox.y = int((y - 1) / 7 * HEIGHT) + if mouse_y >= 500: + fox.y -= 15 status = 0 else : status = 1