From aed59ad8ad3e4ec5eef6c5f250e5409a18dc7dd5 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 18 Feb 2016 08:43:07 +0000 Subject: [PATCH] Not much done, and, to be honest, I'm not even sure it's an improvement. --- project.clj | 3 +- resources/public/css/standard.css | 10 +++-- resources/public/index.html | 69 ++++++++++++++++-------------- src/cljs/mw3/core.cljs | 71 ++++++++++++++++++++++++++----- src/cljs/mw3/rulesets.cljs | 8 ++++ 5 files changed, 114 insertions(+), 47 deletions(-) diff --git a/project.clj b/project.clj index 2104e62..98116b9 100644 --- a/project.clj +++ b/project.clj @@ -15,7 +15,8 @@ [org.omcljs/om "1.0.0-alpha28"] [secretary "1.2.3"] [environ "1.0.2"] - [prismatic/dommy "1.1.0"]] + [prismatic/dommy "1.1.0"] + [immoh/dommy.template "0.2.0"]] :plugins [[lein-cljsbuild "1.1.1"] [lein-environ "1.0.1"]] diff --git a/resources/public/css/standard.css b/resources/public/css/standard.css index 90faaf0..919b4ce 100644 --- a/resources/public/css/standard.css +++ b/resources/public/css/standard.css @@ -117,9 +117,13 @@ input.required:after { } label { - width: 30em; - min-width: 20em; - border-right: thin solid gray; + display: inline-block; + width: 25%; + padding: 0.1em 1.5em; + border-right: 0.25em solid grey; + margin-right: 2em; + text-align: right; + vertical-align: top; } menu li { diff --git a/resources/public/index.html b/resources/public/index.html index 5a4b83b..4f4325c 100644 --- a/resources/public/index.html +++ b/resources/public/index.html @@ -14,19 +14,29 @@
@@ -36,7 +46,6 @@

Welcome to MicroWorld!

-

What this is about

Screenshot @@ -72,7 +81,7 @@

How many houses do you need for a market place? Where would people build a harbour?

Change the rules completely

I've provided rules which use the MicroWorld cellular automaton to make a simple model of the changes to land in Europe after the ice age. But you don't have to use it like that, at all.

-

Conway's Game of Life is one of the famous uses of a cellular automaton. The rules for the Game of Life are very simple. To set up your game of life you'll need some initialisation rules, one for every cell you want to start live (we'll use black for live, and white for dead):

+

Conway's Game of Life is one of the famous uses of a cellular automaton. The rules for the Game of Life are very simple. To set up your game of life you'll need some initialisation rules, one for every cell you want to start live (we'll use black for live, and white for dead):

     if x is equal to 4 and y is equal to 4 and state is new then state should be black

Add as many of these as you need for your starting pattern. Then add a rule, after all those:

@@ -81,18 +90,16 @@

I'll leave you to work out what the rules of life are for yourself, from the Wiki page I linked to.

CHEAT You'll find other rule sets you can explore if you go to the Parameters page.

-

Set your parameters

-

- - {% for ruleset in rulesets %} @@ -100,8 +107,8 @@

- - {% for heightmap in heightmaps %} @@ -109,38 +116,36 @@

-

-

- The pause beteen computing a new state of your world, in seconds -

-

- - +

+ +

-

Edit your rules

-
-

- - + + +

+

+ +

-
-
@@ -154,7 +159,6 @@

Read the documentation

- -