From 07920b89df298d4592650e8eb37cd305bbf9c4e8 Mon Sep 17 00:00:00 2001 From: Elijah Cohen Date: Mon, 21 Nov 2022 16:34:53 -0600 Subject: [PATCH] ready to publish in some form i guess --- README | 2 +- basic.html | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ icn.png | Bin 0 -> 6437 bytes index.html | 61 +++++++++++++++++++++++++++------------------------- life.html | 1 + life.js | 35 +++++++++++++++++++++++++----- minplay.js | 33 ++++++++++++++++++++++++++++ rps.js | 12 +++++++++++ 8 files changed, 171 insertions(+), 35 deletions(-) create mode 100644 basic.html create mode 100644 icn.png create mode 100644 minplay.js diff --git a/README b/README index ecbd6b6..60ddffd 100644 --- a/README +++ b/README @@ -23,7 +23,7 @@ Finally, the drawState method is probably the most complicated method in this cl Finally, extend the Grid class. The constructor needs to call the super's constructor, and pass the subclass you've defined above and your desired 'default' state. There's also an optional 'step' method, which is mostly useful for cellular automata, and enables the play and pause features in the editor (and which can be useful in other contexts as well). This method determines the state of the grid which is to follow immediately from its current state. The 'clone' method from the Hex subclass may be incredibly useful here. -And that's it. To use your new implementation in the editor, just set the variable =g= to a new instance of your grid, and replace 'basic.js' with the name of your file in 'index.html', then load up the 'index.html' in your browser. +And that's it. There are only a couple more things to do before you can use your new implementation in the editor. First, set the variable =g= to a new instance of your grid. Then, make a copy of 'basic.html' named as you'd like, and then in that file replace 'basic.js' with the name of the file your implementation is in. With that done, you can load up the new html file in your browser and get to it! The editor has copying and pasting features, transformation features, saving, loading, importing and exporting features, and can advance and play cellular automata. \ No newline at end of file diff --git a/basic.html b/basic.html new file mode 100644 index 0000000..d73f976 --- /dev/null +++ b/basic.html @@ -0,0 +1,62 @@ + + + + + + + + + + + + hexagonal grids + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + diff --git a/icn.png b/icn.png new file mode 100644 index 0000000000000000000000000000000000000000..0baa94fb8b2028efd922e128818d1cd471f287a8 GIT binary patch literal 6437 zcmcgw2UJttmQG@Th)7YIbR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