#Today, we'll be generating a map for a roguelike RPG! ##Example Map:
Today, we'll be generating a map for a roguelike RPG!
Example Map:
##########
#### F#
#### ##
## C#C#
# ## #
# C #E #
#### # #
# #
#P #
##########
#
are walls, P
is the player's starting location, F
is the finish that must be reached, C
are coins that can be collected, and E
are enemies that can be fought.
##Map specifications:
Map specifications:
- Height and Width should both be between 10 and 39, inclusive. Height does not have to equal width.
- The maps borders should be filled in with walls.
P
should be placed in the bottom left corner.F
should be placed in the top right corner.- There should be between 1 and 3 enemies.
- There should be between 2 and 4 coins.
- There should be some amount of walls in the middle. There should be a path to get from
P
to EveryC
,E
, andF
, keeping in mind that the player cannot move diagonally. - Every possible combination should have some chance of occurring.
##Rules
Rules
- Fewest byte program wins.
- Your program should not take any input.
- Your program may not exit with an error (non-fatal output is
STDERR
is ok, but we can't have our rogue-like crash after map generation!) - A single trailing newline is allowed and trailing space is allowed.
- No other output is allowed.