/model-games

Logic games in the browser, played on first-order models

Primary LanguageCoffeeScript

Model Games

Purpose

This repository is fully explained on its website, which is also hosted on GitHub.

Build process

If you clone the project and want to build it, you will need CoffeeScript installed. Then just run this in the project folder:

coffee -c *.litcoffee

This will (re)generate corresponding .js files in the same folder, which are used by the included index.html.

Note that this project is its own website, because GitHub has (thankfully) moved beyond the gh-pages concept.

Customization

If you want to write your own logic games using this file, follow these steps.

  1. Create an HTML file that will contain the list of games.
  2. Include jQuery and Bootstrap, as the index file in this repository does, in the page's head.
  3. Somewhere in that file, where you wish the list of games to appear, create an HTML Element (such as a DIV) whose ID is modelList.
  4. Create a script that defines your games. Follow the example in this repository, in my-games.litcoffee. That file contains only minimal explanations of what it's doing, because it assumes that you've read the file on which it depends, model-games.litcoffee. Because these files are in Literate CoffeeScript, they're very easy to read on GitHub.
  5. If you wrote your files in CoffeeScript instead of JavaScript, be sure to recompile them as described above.
  6. Import both model-games.js and your (compiled) game definition file at the end of your page body, just as the index file in this repository does.
  7. Load your page and it should function.

License

LGPL