File: demo_floorplan.pl

package info (click to toggle)
libperl6-form-perl 0.090-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 584 kB
  • sloc: perl: 3,080; makefile: 8
file content (41 lines) | stat: -rw-r--r-- 709 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use 5.010;
use warnings;

use Perl6::Form;

$floor_plan = <<EOPLAN;
################################
#                         #  # #
######################### # ## #
#                              #
# #   # #   ###  ##   ######## #
# ##### ###  #  ##    #   #  # #
#       # ##   ##       #    # #
### #####  ############## #### #
#                              #
################################
EOPLAN

$legend = <<'EOLEGEND';
# - Wall
* - Gold
@ - You
^ - Trap
@ - Stairs
$ - Bank
& - Statue
! - Potion
( - Sword
{ - Bow
= - Door
| = Wand
EOLEGEND

print form
    {page=>{length=>24}, fill=>'#'},
    '{=]]]]{*}[[[[=}## {="{*}"=} ##',
    $floor_plan,      {hfill=>' '},
                      $legend;