Last active
April 11, 2020 06:00
-
-
Save aynik/80c65fb16781fff93b5132f7f061c3a0 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
const SOLID = "SOLID"; | |
const LIQUID = "LIQUID"; | |
const GAS = "GAS"; | |
const transitions = { | |
[SOLID]: { | |
melt: LIQUID, | |
sublimate: GAS, | |
}, | |
[LIQUID]: { | |
vaporize: GAS, | |
freeze: SOLID, | |
}, | |
[GAS]: { | |
condensate: LIQUID, | |
deposit: SOLID, | |
}, | |
}; | |
function nextTransition(transitions: ???) { | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment