Code Monkey home page Code Monkey logo

inductive-mazes's Introduction

This is the code accompanying my blog post: Generating Mazes with Inductive Graphs.

Build instructions courtesy of Mike Xie and Rianna Morgan

Libcairo

libcairo is a C++ library, their site and instructions on how to install by OS can be found here: http://cairographics.org/download/

On Ubuntu, you can install it with apt-get:

sudo apt-get install libcairo2-dev

Installation with Cabal

Get the project:

git clone https://github.com/TikhonJelvis/inductive-mazes.git
cd inductive-mazes

If your cabal bin directory is not in your PATH, add it:

export PATH=$HOME/.cabal/bin:$PATH  – or wherever your cabal directory is

The project should probably be built inside of a sandbox.

cabal sandbox init

cabal install gtk2hs-buildtools
cabal install inductive-mazes.cabal

Installation with Stack

Building under Stack is quite simple and obviates the need for building within a cabal sandbox.

Get the project:

git clone https://github.com/TikhonJelvis/inductive-mazes.git
cd inductive-mazes

From within the project directory, run:

stack init

Stack will then install the packages locally for the project.

Interactive Use

Run the following inside the inductive-mazes directory:

cabal repl

If using stack, run:

stack ghci

Once in the ghci instance, run:

*Draw> genPng defaults "my-maze.png" 40 40
^D – exiting cabal repl

After having returned to the terminal, view the new maze file with your favourite .png views:

eog my-maze.png -- or whatever your png viewer is

inductive-mazes's People

Contributors

chronologos avatar r-morgan avatar tikhonjelvis avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.