Restyling; much reorganisation of documentation.
This commit is contained in:
parent
05e9daf662
commit
c15cd08159
17 changed files with 217 additions and 257 deletions
|
|
@ -12,28 +12,23 @@ represented as a map having at least the following properties:
|
|||
* **y** The Y offset of this cell within the array (should not be tampered with).
|
||||
* **state** The current state of this cell, represented as a clojure key; initially :waste.
|
||||
|
||||
As currently initialised all cells have two additional properties:
|
||||
|
||||
* **altitude** Altitude of this cell. Initially 1. Currently not used.
|
||||
* **fertility** Soil fertility of this cell. Initially 1. Increases under climax forest; later, will decrease under ploughland, may increase under pasture.
|
||||
|
||||
Rules can add any additional properties to cells that you like; the current
|
||||
'natural-rules' rule-set adds properties for the populations of deer and of
|
||||
'ecology' rule-set adds properties for the populations of deer and of
|
||||
wolves.
|
||||
|
||||
### Representation of rules
|
||||
|
||||
Rules are just ordinary Clojure functions (can be anonymous functions, and in the current
|
||||
rule-sets they are) which take two arguments, a cell and a world, and return
|
||||
either nil (indicating the rule did not fire), or a new cell which should have
|
||||
the same :x and :y properties as the cell passed in. Any other properties can
|
||||
be different.
|
||||
Rules are simple production rules, in a [grammar](docs#grammar) defined in the
|
||||
documentation. Each rule is compiled into a Clojure anonymous function of two
|
||||
arguments, **world** and **cell**, which if its conditions are met returns a
|
||||
new cell which must the same **x** and **y** values as the cell which was
|
||||
passed. Any other properties may be modified.
|
||||
|
||||
## What is MicroWorld for
|
||||
|
||||
The underlying intention is to crudely model the evolution of human settlement
|
||||
in a landscape, but also to act as a learning environment to teach ideas about
|
||||
software and about ecology.
|
||||
software and about geography and ecology.
|
||||
|
||||
## User interface
|
||||
|
||||
|
|
@ -45,19 +40,5 @@ of the world cell.
|
|||
|
||||
The 'state' classes are defined in a CSS file 'states.css', which should be
|
||||
edited when you add additional states. Image files should be 32x32 pixels and
|
||||
should be stored in the directory 'img/tiles', but at this stage I haven't
|
||||
created any.
|
||||
|
||||
## Future plans
|
||||
|
||||
### Run in the browser
|
||||
|
||||
Currently the simulation runs on the server and only the display is in the
|
||||
browser. It would be much better converted to ClojureScript and run in the browser
|
||||
- that would save both network traffic and server load, and would allow the
|
||||
animation to run faster.
|
||||
|
||||
### Rule language
|
||||
|
||||
It would be good to have a near-English rule parser to make rules easier for
|
||||
children to add and modify.
|
||||
should be stored in the directory 'img/tiles', be in PNG format, and have a
|
||||
name comprising the name of the state followed by '.png'.
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
### Managing Your Middleware
|
||||
|
||||
Two middleware functions are provided by default in the `mw-ui.middleware` namespace.
|
||||
|
||||
* `log-request` - logs all requests using the debug level
|
||||
* `template-error-page` - provides friendly formatting for Selmer errors in dev mode
|
||||
|
||||
See the `:middleware` key of the `app` definition located in the `mw-ui.handler` namespace to manage the enabled middleware.
|
||||
|
||||
### Here are some links to get started
|
||||
|
||||
1. [HTML templating](http://www.luminusweb.net/docs/html_templating.md)
|
||||
2. [Accessing the database](http://www.luminusweb.net/docs/database.md)
|
||||
3. [Serving static resources](http://www.luminusweb.net/docs/static_resources.md)
|
||||
4. [Setting response types](http://www.luminusweb.net/docs/responses.md)
|
||||
5. [Defining routes](http://www.luminusweb.net/docs/routes.md)
|
||||
6. [Adding middleware](http://www.luminusweb.net/docs/middleware.md)
|
||||
7. [Sessions and cookies](http://www.luminusweb.net/docs/sessions_cookies.md)
|
||||
8. [Security](http://www.luminusweb.net/docs/security.md)
|
||||
9. [Deploying the application](http://www.luminusweb.net/docs/deployment.md)
|
||||
10
resources/public/md/lesson-plans/example.md
Normal file
10
resources/public/md/lesson-plans/example.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
## Lesson plans
|
||||
|
||||
I haven't actually written any lesson plans, since I'm not a teacher and that
|
||||
isn't my skill. If you use MicroWorld in class, and find it useful, and would
|
||||
like to contribute a lesson plan, please mail it to [me](mailto:simon@journeyman.cc).
|
||||
|
||||
Ideally your lesson plan should be written in 'markdown' style, the very simple
|
||||
style which is used in this document and other documentation within the program,
|
||||
but frankly it doesn't matter - I'll accept them in any format, including hand
|
||||
written notes or even (gasp) Microsoft Word.
|
||||
3
resources/public/md/missing.md
Normal file
3
resources/public/md/missing.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
## No content file was found?
|
||||
|
||||
No content file was found. Are you sure the right one was specified?
|
||||
Loading…
Add table
Add a link
Reference in a new issue