Execute SNUSP/D: Difference between revisions
m
Fixed syntax highlighting.
m (<lang>) |
m (Fixed syntax highlighting.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1:
{{implementation|SNUSP}}{{collection|RCSNUSP}}
This [[D]] implementation supports commands from all the three SNUSP variants, as described on the [[eso:SNUSP|Esolang SNUSP page]], plus an extended mode, '''SUPERNATURAL'''.
'''SUPERNATURAL Mode''':
Line 25:
:::==a^A<=cp==B^==<=C^==
::when the code pointer cp heading into A's^, next turn, the code pointer will be in C. if no such ^ in the reverse direction, the code pointer will be in ''a'' next turn.
<syntaxhighlight lang="d">module snud ;
private import std.string, std.random ;
Line 211 ⟶ 210:
private char[char] acceptCmd ;
private uint Id = 0 ;
}</syntaxhighlight>
Sample SNUSP using a console io :
<syntaxhighlight lang="d">module rcsnusp ;
import snud ;
import std.stdio, std.file, std.conv ;
Line 266 ⟶ 263:
return result ;
}</syntaxhighlight>
|