-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.py
41 lines (37 loc) · 1.25 KB
/
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
34
35
36
37
38
39
40
41
import time
import traceback
from rs.ai.claw_is_law.claw_is_law import CLAW_IS_LAW
from rs.ai.peaceful_pummeling.peaceful_pummeling import PEACEFUL_PUMMELING
from rs.ai.pwnder_my_orbs.pwnder_my_orbs import PWNDER_MY_ORBS
from rs.ai.requested_strike.requested_strike import REQUESTED_STRIKE
from rs.ai.shivs_and_giggles.shivs_and_giggles import SHIVS_AND_GIGGLES
from rs.helper.seed import make_random_seed
from rs.api.client import Client
from rs.machine.game import Game
from rs.helper.logger import log, init_log, log_new_run_sequence
# If there are run seeds, it will run them. Otherwise, it will use the run amount.
run_seeds = [
#'LGZ12EEMFGUK',
]
run_amount = 1
strategy = PEACEFUL_PUMMELING
if __name__ == "__main__":
init_log()
log("Starting up")
log_new_run_sequence()
try:
client = Client()
game = Game(client, strategy)
if run_seeds:
for seed in run_seeds:
game.start(seed)
game.run()
time.sleep(1)
else:
for i in range(run_amount):
game.start(make_random_seed())
game.run()
time.sleep(1)
except Exception as e:
log("Exception! " + str(e))
log(traceback.format_exc())