summaryrefslogtreecommitdiff
path: root/examples/statemachine/trafficlightstate.pystate
diff options
context:
space:
mode:
Diffstat (limited to 'examples/statemachine/trafficlightstate.pystate')
-rw-r--r--examples/statemachine/trafficlightstate.pystate14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/statemachine/trafficlightstate.pystate b/examples/statemachine/trafficlightstate.pystate
index d0f0a35..8790189 100644
--- a/examples/statemachine/trafficlightstate.pystate
+++ b/examples/statemachine/trafficlightstate.pystate
@@ -18,21 +18,21 @@ statemachine TrafficLightState:
# define some class level constants
-Red.carsCanGo = False
-Yellow.carsCanGo = True
-Green.carsCanGo = True
+Red.cars_can_go = False
+Yellow.cars_can_go = True
+Green.cars_can_go = True
# setup some class level methods
-def flashCrosswalk(s):
+def flash_crosswalk(s):
def flash():
print("%s...%s...%s" % (s, s, s))
return flash
-Red.crossingSignal = staticmethod(flashCrosswalk("WALK"))
-Yellow.crossingSignal = staticmethod(flashCrosswalk("DONT WALK"))
-Green.crossingSignal = staticmethod(flashCrosswalk("DONT WALK"))
+Red.crossing_signal = staticmethod(flash_crosswalk("WALK"))
+Yellow.crossing_signal = staticmethod(flash_crosswalk("DONT WALK"))
+Green.crossing_signal = staticmethod(flash_crosswalk("DONT WALK"))
# setup some instance methods