This repository has been archived on 2023-12-31. You can view files and clone it, but cannot push or open issues or pull requests.
Considition-2020/launcher.py

24 lines
461 B
Python
Raw Normal View History

import main
2020-10-07 03:34:42 +02:00
import time
from multiprocessing import Pool
import multiprocessing
proc_running = 4 # MAX 4!!!
def run_main(n):
result = main.main()
return result
def launch(list):
for result in list:
print("Game " + result[0] + " had a score of: " + str(result[1]))
input("Press Enter to exit")
if __name__ == '__main__':
with Pool(proc_running) as p:
results = p.map(run_main, range(proc_running))
launch(results)