|
|
|
|
|
|
|
|
import random as r |
|
|
import random as r |
|
|
import sys |
|
|
|
|
|
|
|
|
import sys, os |
|
|
from PIL import Image |
|
|
from PIL import Image |
|
|
|
|
|
|
|
|
def createDungeon(x=None, y=None, seed=None): |
|
|
def createDungeon(x=None, y=None, seed=None): |
|
|
|
|
|
|
|
|
filename = [] |
|
|
filename = [] |
|
|
for _ in range(16): |
|
|
for _ in range(16): |
|
|
filename.append(r.choice(hexes)) |
|
|
filename.append(r.choice(hexes)) |
|
|
|
|
|
if not os.path.exists("maps"): |
|
|
|
|
|
os.makedirs("maps") |
|
|
img.save('maps/{}.png'.format("".join(filename))) |
|
|
img.save('maps/{}.png'.format("".join(filename))) |
|
|
print("Saved maps/{}.png".format("".join(filename))) |
|
|
print("Saved maps/{}.png".format("".join(filename))) |
|
|
|
|
|
|