RCRPG/Julia: Difference between revisions

m
Fixed syntax highlighting.
m (Fixed syntax highlighting.)
 
(2 intermediate revisions by one other user not shown)
Line 1:
This [[Julia]] version of [[RCRPG]] contains two versions of the game code: one version with a text interface and a second one with a GUI interface.
 
===Language Idioms===
 
This program illustrates some of the interesting aspects of Julia:
Line 14:
* The use of @async to allow co-routine based multitasking with Channels to communicate between co-routines
 
== =Objective ===
The objective of the game is to find your way to the treasure room, which is located in the upper left of level 5
(against the dungeon level 5 corner at (1, 1, 5)), and then to exit the game by ascending above level 1.
 
===Commands===
 
Direction commands:<pre>north, south, east, west, up, down</pre>Type the first letter of these commands
Line 45:
 
Current room in(f)ormation: Letter f.
 
Aliasing: Letter l. Restrictions are that the keys are case insensitive and cannot be extended keys.
 
Help: Letter h.
 
===Code===
<langsyntaxhighlight lang="julia">using Crayons
 
struct Point
Line 570 ⟶ 572:
 
rungame()
</syntaxhighlight>
</lang>
 
==GUI Code==
<langsyntaxhighlight lang="julia">using Gtk.ShortNames, Colors, Cairo, Graphics
 
#============== GUI CODE ===================#
Line 1,211 ⟶ 1,213:
end
 
rungame()</syntaxhighlight>
</lang>
9,476

edits