Execute SNUSP/D: Difference between revisions
Content added Content deleted
m (<lang>) |
m (Categorization now in master page) |
||
Line 1: | Line 1: | ||
{{implementation|SNUSP}}{{collection|RCSNUSP}} |
{{implementation|SNUSP}}{{collection|RCSNUSP}} |
||
This implementation supports commands from all the three SNUSP variants, as described on the [[eso:SNUSP|Esolang SNUSP page]], plus an extended mode, '''SUPERNATURAL'''. |
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''': |
'''SUPERNATURAL Mode''': |
||
Line 25: | Line 25: | ||
:::==a^A<=cp==B^==<=C^== |
:::==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. |
::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. |
||
<lang d> |
<lang d>module snud ; |
||
module snud ; |
|||
private import std.string, std.random ; |
private import std.string, std.random ; |
||
Line 211: | Line 210: | ||
private char[char] acceptCmd ; |
private char[char] acceptCmd ; |
||
private uint Id = 0 ; |
private uint Id = 0 ; |
||
⚫ | |||
} |
|||
⚫ | |||
Sample SNUSP using a console io : |
Sample SNUSP using a console io : |
||
<lang d> |
<lang d>module rcsnusp ; |
||
module rcsnusp ; |
|||
import snud ; |
import snud ; |
||
import std.stdio, std.file, std.conv ; |
import std.stdio, std.file, std.conv ; |
||
Line 266: | Line 263: | ||
return result ; |
return result ; |
||
⚫ | |||
} |
|||
⚫ |