mw-engine.render

Render a world as HTML.

Adapted (simplified) from mw-ui.render-world; this is for visualisation, not interaction.

*state-images-relative-path*

dynamic

TODO: write docs

format-css-class

(format-css-class statekey)

Format this statekey, assumed to be a keyword indicating a state in the world, into a CSS class

format-image-path

(format-image-path statekey)

Render this statekey, assumed to be a keyword indicating a state in the world, into a path which should recover the corresponding image file.

format-mouseover

(format-mouseover cell)

TODO: write docs

render-cell

(render-cell cell)

Render this world cell as a Hiccup table cell.

render-world-page

(render-world-page world)(render-world-page world state-images-relative-path)

TODO: write docs

render-world-row

(render-world-row row)

Render this world row as a Hiccup table row.

render-world-table

(render-world-table world)(render-world-table world state-images-relative-path)

Render this world as a complete HTML table in a DIV. If state-images-relative-path is passed, use that to override the default path.

world->html-file

(world->html-file world output-path)(world->html-file world output-path state-images-relative-path)

TODO: write docs