mirror of
https://github.com/mfocko/blog.git
synced 2024-11-10 08:19:07 +01:00
Matej Focko
a868efaee6
* Switch the archiving from the ‹zip› to ‹tar.gz› and ‹tar.bz2› * Adjust the static files to have consistent paths Signed-off-by: Matej Focko <me@mfocko.xyz>
21 lines
486 B
Python
21 lines
486 B
Python
#!/usr/bin/env python3
|
|
|
|
from itertools import product
|
|
|
|
|
|
def generate_map(template: str, st: int, ave: int) -> str:
|
|
return template.format(st=st, ave=ave)
|
|
|
|
|
|
def main():
|
|
template = None
|
|
with open("maze_skel.kw", "r") as f:
|
|
template = f.read()
|
|
|
|
for st, ave in product(range(1, 7), range(1, 7)):
|
|
with open("maze{:03d}.kw".format(st * 6 + ave), "w") as out:
|
|
print(generate_map(template, st, ave), file=out)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|