Last active
March 12, 2019 16:41
-
-
Save ddefb/50befbe0d4ef7176b486048125a7d9d6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node movement(c: bool) returns (turning: bool; ombc:int) | |
var last mbc:int = 0; | |
let | |
ombc = mbc; | |
automaton | |
state MOVING do | |
mbc = 0; | |
turning = false; | |
unless not c then STURNING | |
state STURNING do | |
mbc = 0; | |
turning = true; | |
until not c then TURNING | c then MOVING | |
state TURNING do | |
mbc = last mbc + 1; | |
turning = true; | |
unless c & (12 = last mbc) then STURNING | |
end | |
tel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment