Coder Social home page Coder Social logo

js-maze's Introduction

js-maze

A small maze generator in JS.

About:

A small maze generator written in Javascript with which supports more than 1 algorithms (so far I have depth-first search and a variant on it).

It also allows for the user to walk a dot around the maze in search of another dot.

Rationale:

I just wanted to test class syntax, imports and exports. I also like mazes and wanted to refresh my Canvas basics so...

Building.

  • If your browser support ES6 style imports and exports:
    • Do nothing. Use index.html and be happy.
  • Else:
    • Solve the package.json dependencies with npm.
    • Do "npm run build".
    • Use index.html

Adding generators.

The interface of a generator is begin(_maze):void, step(_maze):void and get_step_coords():Coords.

Generators are created in the "build_generator" method, in "controller.js". Check the examples provided.

TODO

- Add scrolling on very large mazes.
- Allow view panning.
- Center on smaller mazes.
- Add a better presentation, just in case.
- Add step marker, for the step thing.
- Add STEP method for generator B.
- Fix TODO.
- Add "3d" view.

js-maze's People

Contributors

themarlboroman avatar

Watchers

James Cloos 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.