-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
33 lines (26 loc) · 848 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""The main file for the AI-Mario-Party program."""
import time
import sys
import pyautogui
from src import *
game_names = ["Goomba wrangler"]
game_scripts = [name.replace(" ", "_").title() for name in game_names]
game_script_index = 1
if __name__ == "__main__":
# Confirmation box to start the program.
selected_button = pyautogui.confirm(
"Select a minigame to have the AI play.",
title="AI Mario Party",
buttons=game_names + ["Cancel"]
)
if selected_button == "Cancel" or selected_button is None:
sys.exit()
elif selected_button == "Goomba wrangler":
from src.goomba_wrangler import invoke_ai
timeout = time.time() + 30 # 30 seconds from now
i = 0
while True:
invoke_ai(main_screen=False)
if time.time() > timeout:
break
i += 1