Project

knossos

0.0
No commit activity in last 3 years
No release in over 3 years
A library for generating mazes inspired by "Mazes for Programmers" by Jamis Buck and "Think Labyrinth!" by Walter Pullen.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 10.0
~> 3.0

Runtime

 Project Readme

Knossos

A library for generating mazes inspired by Mazes for Programmers by Jamis Buck and Think Labyrinth! by Walter Pullen.

Installation

Add the following line to your application's Gemfile:

gem 'knossos'

Or install the library globally with:

~$ gem install knossos

Usage

#!/usr/bin/env ruby

require 'knossos'

grid = Knossos::Grid.new({rows: 5, columns: 5})
carver = Knossos::Algorithm::BinaryTree.new
carver.carve(grid: grid)

text_renderer = Knossos::Renderer::Text.new
puts text_renderer.render(grid: grid)

image_renderer = Knossos::Renderer::Image.new(grid)
png = image_renderer.render
png.save("maze.png")

Contributing

Bug reports and pull requests are welcome on GitHub. Knossos provides a safe, welcoming space for collaboration. Everyone contributing to our project—including the codebase, issue trackers, chat, email, social media and the like—is expected to uphold our Code of Conduct.

Setting Up

Fork the project on GitHub and make a local clone. Install dependencies, and run the tests:

~/knossos$ bin/setup
~/knossos$ bundle exec rake rspec

Running the Code

You can experiment with the code interactively using:

~/knossos$ bin/console

Publishing

To release a new version of the library, first increment the version number in lib/knossos/version.rb following Semantic Versioning policy, and update CHANGELOG.md. Commit your work, and finally, run:

# Create a git tag, push commits and tags, and publish to rubygems.org
~/knossos$ bundle exec rake release

License

This gem is available as open source under the terms of the MIT License.


This file is composed with GitHub Flavored Markdown.