Skip to content

Commit 7a3f0ff

Browse files
Christiandragonchaser
authored andcommitted
Initial commit
0 parents  commit 7a3f0ff

File tree

18 files changed

+459
-0
lines changed

18 files changed

+459
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.byebug_history

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Christian Richter
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# MAPTOOL
2+
3+
Maptool is a small tool to generate nethack-style ASCII dungeons.
4+
It is a WIP at the moment so expect breaking changes and bugs.
5+
6+
**LICENSE:** MIT see [LICENSE](https://github.com/dragonchaser/maptool/blob/master/LICENSE) file in this repository.
7+
8+
## usage
9+
10+
```
11+
Usage: ./maptool.rb [options]
12+
-r, --rows=ROWS Dungeon rows (default: 10)
13+
-c, --cols=COLS Dungeon cols (default: 10)
14+
-e, --empty=PROBABILTY Probablility of creating an empty tile (default: 0.02)
15+
-p, --precision=PRECISION Precision used for calculationg weighted probablities with -e (default: 2, will resort to defaults if <2 || > 14)
16+
-b, --border Print tile border (default: false)
17+
-v, --verbose Verbose mode
18+
-V, --superverbose Super verbose mode
19+
-h, --help Prints this help
20+
```
21+
22+
## examples
23+
24+
### with border
25+
26+
```
27+
.......................................
28+
. . . |~~| .
29+
. . . +--+~~+--+ .
30+
. . . |~~~~~~~~| .
31+
. +-------.------------.-+~~~~~~~~+-.
32+
. |~~~~~~~.~~~~~~~~~~~~.~~~~~~~~~~~~.
33+
. |~~~~~~~.~~~~~~~~~~~~.~~~~~~~~~~~~.
34+
. |~~+----.------------.-+~~~~~~~~+-.
35+
. |~~| . . |~~~~~~~~| .
36+
. |~~| . . +--+~~+--+ .
37+
. |~~| . . |~~| .
38+
........................................
39+
. |~~| . . |~~| .
40+
. |~~| . . |~~| .
41+
. |~~| . . |~~| .
42+
.----+~~+----.------------.----+~~+----.
43+
.~~~~~~~~~~~~.~~~~~~~~~~~~.~~~~~~~~~~~~.
44+
.~~~~~~~~~~~~.~~~~~~~~~~~~.~~~~~~~~~~~~.
45+
.----+~~+----.----+~~+----.----+~~+----.
46+
. |~~| . |~~| . |~~| .
47+
. |~~| . |~~| . |~~| .
48+
. |~~| . |~~| . |~~| .
49+
........................................
50+
. |~~| . |~~| . |~~| .
51+
. |~~| . |~~| . |~~| .
52+
. |~~| . |~~| . |~~| .
53+
. |~~| . |~~| . |~~| .
54+
. |~~| . |~~| . |~~| .
55+
. |~~| . |~~| . |~~| .
56+
. |~~| . |~~| . |~~| .
57+
. |~~| . |~~| . |~~| .
58+
. |~~| . |~~| . |~~| .
59+
. |~~| . |~~| . |~~| .
60+
........................................
61+
```
62+
63+
### without border
64+
65+
```
66+
------------ ------------
67+
~~~~~~~~~~~~ ~~~~~~~~~~~~
68+
~~~~~~~~~~~~ ~~~~~~~~~~~~
69+
----+~~+---- ----+~~+----
70+
|~~| |~~|
71+
|~~| |~~|
72+
|~~| |~~|
73+
|~~| |~~| |~~|
74+
|~~| +--+~~+--+ +--+~~+--+
75+
|~~| |~~~~~~~~| |~~~~~~~~|
76+
----+~~+-----+~~~~~~~~+--+~~~~~~~~+-
77+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79+
----+~~+-----+~~~~~~~~+--+~~~~~~~~+-
80+
|~~| |~~~~~~~~| |~~~~~~~~|
81+
|~~| +--+~~+--+ +--+~~+--+
82+
|~~| |~~| |~~|
83+
|~~| |~~| |~~|
84+
+--+~~+--+ |~~| |~~|
85+
|~~~~~~~~| |~~| |~~|
86+
-+~~~~~~~~+-----+~~+--------+~~+----
87+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89+
-+~~~~~~~~+-----+~~+--------+~~+----
90+
|~~~~~~~~| |~~| |~~|
91+
+--+~~+--+ |~~| |~~|
92+
|~~| |~~| |~~|
93+
```

lib/assets/ascii/0.tile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{"n": true, "e": true, "s": true, "w": true}
2+
3+
4+
5+
6+
7+
8+
9+
10+
11+

lib/assets/ascii/1.tile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{"n": false, "e": true, "s": false, "w": true}
2+
3+
4+
5+
------------
6+
~~~~~~~~~~~~
7+
~~~~~~~~~~~~
8+
------------
9+
10+
11+

lib/assets/ascii/10.tile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{"n": false, "e": false, "s": true, "w": false}
2+
3+
+--------+
4+
|~~~~~~~~|
5+
|~~~~~~~~|
6+
|~~~~~~~~|
7+
|~~~~~~~~|
8+
|~~~~~~~~|
9+
|~~~~~~~~|
10+
+--+~~+--+
11+
|~~|

lib/assets/ascii/11.tile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{"n": true, "e": false, "s": true, "w": false}
2+
|~~|
3+
|~~|
4+
|~~|
5+
|~~|
6+
|~~|
7+
|~~|
8+
|~~|
9+
|~~|
10+
|~~|
11+
|~~|

lib/assets/ascii/12.tile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{"n": false, "e": false, "s": true, "w": false}
2+
3+
4+
5+
+--+
6+
|__|
7+
|__|
8+
|__|
9+
|~~|
10+
|~~|
11+
|~~|

lib/assets/ascii/2.tile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{"n": false, "e": true, "s": false, "w": true}
2+
3+
+--------+
4+
|~~~~~~~~|
5+
-+~~~~~~~~+-
6+
~~~~~~~~~~~~
7+
~~~~~~~~~~~~
8+
-+~~~~~~~~+-
9+
|~~~~~~~~|
10+
+--------+
11+

lib/assets/ascii/3.tile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{"n": false, "e": true, "s": true, "w": false}
2+
3+
4+
5+
+-------
6+
|~~~~~~~
7+
|~~~~~~~
8+
|~~+----
9+
|~~|
10+
|~~|
11+
|~~|

0 commit comments

Comments
 (0)