RCRPG/Perl: Difference between revisions
m
Fixed syntax highlighting.
m (→Code: Corrected a word. ("know" was "now")) |
m (Fixed syntax highlighting.) |
||
Line 2:
This [[Perl]] version of [[:Category:RCRPG|RCRPG]] implements a text interface.
===Language Idioms===
(Add to this list if you see anything of interest not mentioned.)
Line 13:
* [[Linked list|Linked lists]] (The rooms are linked by keeping a list of keys to connected rooms in each room. This adds a lookup step, but each key could be thought of a pointer in the classic sense of a linked list.)
===Commands===
Here is a description of all of the commands:
Line 47:
Give an existsing command an alias. Starting aliases are n,s,e,w,u,d. i and inv are the same as inventory, a is the same as attack.
===Use===
None of the rooms are connected. In fact, at the start of the game, only two rooms really exist; the Start and the Prize room. There’s a third room, but it exists outside of the 3D coordinate space, and it’s used to initialize each room the player creates by moving around.
Line 61:
The player can make their way to the Prize Room at (1,1,5), but there's nothing useful there; just gold.
===Code===
<
use strict;
use Data::Dumper;
Line 759:
print "\n";
}
}</
|