🚨 Shai-Hulud Strikes Again:More than 500 packages and 700+ versions compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@sbj42/maze-generator-kruskal

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sbj42/maze-generator-kruskal

A maze generator using a randomized Kruskal's algorithm

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

maze-generator-kruskal

A maze generator using a randomized Kruskal's algorithm

This is a plugin for the sbj42/maze-generator package.

Kruskal's algorithm is a method of generating a "minimum spanning tree" of an arbitrary graph. This adapts naturally to generating mazes, since every perfect maze is also a spanning tree. For each wall, in random order, we turn the wall into a passage if doing so does not generate a loop. That's it.

___________________________________________________
|__ __|__ | | ___ | _______ __| | __________| | __|
| _ | ______| |__ _ | _ _ | ___ ____| __| _ ___ _ |
| |___|____ ___ |_|_|_| | | _ | ___ |_____|_|___| |
| | | ___ | | |____ ____| |_| |_| __|__ __| | ___ |
| _ __|__ |_| _ | | __|__ | |_| |_| |__ | ___ | | |
| |_|__ | |___|__ | _ __|__ | |__ | ___ _ | | | | |
|_| _ |____ ___ _ __| _ | |___| _ |__ | |_|____ | |
| __| | | __|___| |___| | ___ __|_| |_| |__ _ _ |_|
|__ |__ | ___ __| |__ __| __|_| _ ______|___| | | |
| ___ |__ _ |_| |_| | | ____|___|_| |__ | __| | | |
| | | | | |__ | _ |__ ___ ___ ___ ___ _ | ___ | __|
|___|_| __|__ | |_| ____| | __| _ | | | |_| __|___|
|__ _____ __|__ |__ _ | |_|_|___| __|_|____ ___ | |
| |_| _____ | |___| |_|__ __|__ _ |__ __| _ |__ __|
|_________|_______|_|___________|_______|_|_|_____|

Keywords

maze-generator

FAQs

Package last updated on 29 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts