CLI-based maze-game: Difference between revisions

m
syntax highlighting fixup automation
m (fixed header)
m (syntax highlighting fixup automation)
Line 34:
 
=={{header|Furor}}==
<langsyntaxhighlight lang=Furor>
###sysinclude terminal.uh
###sysinclude into.uh
Line 657:
}
// ---------------------------------------------------------
</syntaxhighlight>
</lang>
{{out}}
<pre>
Line 699:
{{libheader|nim-ncurses}}
This translation uses the binding for “ncurses” and have been tested on Linux (Manjaro).
<langsyntaxhighlight lang=Nim>import os, random, sequtils, strutils, std/exitprocs, locks
import ncurses
 
Line 1,069:
 
 
play()</langsyntaxhighlight>
 
=={{header|Phix}}==
<!--<langsyntaxhighlight lang=Phix>(notonline)-->
<span style="color: #000080;font-style:italic;">-- demo/rosetta/CLI_maze.exw</span>
<span style="color: #008080;">without</span> <span style="color: #008080;">js</span> <span style="color: #000080;font-style:italic;">-- (wait_key(), get_key(), position(), clear_screen(), etc)</span>
Line 1,456:
<span style="color: #0000FF;">{}</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">wait_key</span><span style="color: #0000FF;">()</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<!--</langsyntaxhighlight>-->
 
=={{header|Wren}}==
Line 1,466:
{{libheader|Wren-trait}}
An embedded script so we can use the ncurses library.
<langsyntaxhighlight lang=ecmascript>/* cli_based_maze_game.wren */
 
import "./dynamic" for Enum, Tuple, Struct
Line 1,882:
NC.nocbreak()
NC.endwin()
NC.cursSet(1)</langsyntaxhighlight>
<br>
We now embed this in the following C program, build and run it.
<langsyntaxhighlight lang=c>/* gcc cli_based_maze_game.c -o cli_based_maze_game -lncurses -lwren -lm */
 
#include <stdio.h>
Line 2,067:
free(script);
return 0;
}</langsyntaxhighlight>
{{out}}
Sample opening screen.
10,333

edits