0.0
No commit activity in last 3 years
No release in over 3 years
A simple 2d maze solving application
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 0.8
~> 5.0
~> 10.0
 Project Readme

maze_crosser

Build Status Coverage Status Maintainability

A simple 2D maze solving application.

Installation

Add this line to your application's Gemfile:

gem 'maze_crosser'

And then execute:

$ bundle

Or install it yourself as:

$ gem install maze_crosser

Usage

After installing the gem, open an irb prompt and type

require 'maze_crosser'

You are now provided with two instance variables, @maze_crosser_runner and @cache_provider. You can use these as follows:

# Empty the cache
@cache_provider.empty_cache!

# Provide a path to a grid file and a solving algorithm. Currently, the only
# algorithm option is 'recursive' (set as default).
@maze_crosser_runner.run('path_to_file')

Grid file

The grid file should have a .txt extension and follow the format below:

___SX
XXX_X
G___X
XX_XX

where:

  • G: End goal
  • S: Starting poing
  • X: Blocked point
  • _: Free point

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/load for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

License

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