/twitter-maze-bot

A collaborative maze-generating twitter bot

Primary LanguageJavaScript

Twitter Maze Bot

This program algorithmically generates mazes and can be interacted with through twitter.

When running, @mazingbot tweets an image of a maze and tracks replies. If a reply contains one or more directions (left/l, right/r, up/u, down/d) it moves the current pointer accordingly, creating a trail in the user's profile link colour, and replies with an image of the updated maze path. When complete it makes a thank you tweet mentioning all the contributors, and tweets out a fresh maze. The cycle begins again.

Setup

Clone .env-example, rename it to .env and fill in with Twitter access keys and tokens which can be generated by registering an app. Run npm install to install dependecies. node-canvas has extra system dependencies, instructions on installation can be found here.

Development and Deployment

npm start - run locally using the nodemon file watcher.

npm run build && npm run serve - run the current instance without a file watcher.

npm run build && npm run forever - start a persistant instance using forever.

Screenshots

Completed Mazes

References

The 'hunt and carve' algorithm idea was taken from Mazes for Programmers by Jamis Buck.