Skip to content

Instantly share code, notes, and snippets.

@adusak
adusak / generate_maze.py
Created June 2, 2015 20:23
Hexagon maze generator
import copy
import math
import random
from python.common.svg import Svg
def coordinate_to_string(i, j):
return str(i) + "," + str(j)
@silverhammermba
silverhammermba / terrible.rb
Last active May 23, 2022 17:45
Generates word searches with only a single word to find, but every letter in the grid is in the word.
#!/usr/bin/env ruby
# terrible word search generator
# inspired by http://cnlohr.blogspot.com/2014/02/to-make-terrible-wordsearches.html
if ARGV.length != 3
STDERR.puts "usage: #$0 WIDTH HEIGHT WORD"
exit 1
end
$word = ARGV[2].upcase
@jamis
jamis / weave.rb
Created March 4, 2011 05:23
A "weave" maze implementation, using the Growing Tree maze algorithm.
# --------------------------------------------------------------------
# An implementation of a "weave" maze (with over/under passages),
# using the Growing Tree maze generation algorithm.
# --------------------------------------------------------------------
# --------------------------------------------------------------------
# Helper data and methods
# --------------------------------------------------------------------
N, S, E, W, U = 0x01, 0x02, 0x04, 0x08, 0x10