-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample2.py
40 lines (24 loc) · 889 Bytes
/
example2.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
from automatabpp import *
def print_w_timeout(text: str):
import time
print("\r {}".format(text), end="")
time.sleep(0.6)
BEHAVIOUR.load_behaviour_from_graph("hbfs/harderfaster.graphml", "HARDER/FASTER")
@EXECUTION.state
def HARDER(**_):
print_w_timeout("Work it harder")
@EXECUTION.state
def FASTER(**_):
print_w_timeout("Do it faster")
BEHAVIOUR.load_behaviour_from_graph("hbfs/betterstronger.graphml", "BETTER/STRONGER")
@EXECUTION.state
def BETTER(**_):
print_w_timeout("make it better")
@EXECUTION.state
def STRONGER(**_):
print_w_timeout("makes us stronger")
# ...............................................................................
# ---------- DEFINITIONS COMPLETE - RUNNING THE PROGRAM -------------------------
# ...............................................................................
OPERATION.start()
OPERATION.run()