mirror of
https://github.com/rileyjshaw/terra.git
synced 2024-11-21 04:54:23 +00:00
fix: factory was supposed to be terra.
This commit is contained in:
parent
c96c70baf3
commit
841a27a83d
@ -67,7 +67,7 @@ window.terra;</code></pre>
|
|||||||
<h3>Creating the environment</h3>
|
<h3>Creating the environment</h3>
|
||||||
<p>To run a simulation, we'll need to create an environment. Let's make a 25x25 grid, populate 10% of the space with our lonely purple creature, and fill the rest with simple plants. We'll have to define a <code class="language-javascript">simplePlant</code> creature, but don't worry too much about how that works just yet.</p>
|
<p>To run a simulation, we'll need to create an environment. Let's make a 25x25 grid, populate 10% of the space with our lonely purple creature, and fill the rest with simple plants. We'll have to define a <code class="language-javascript">simplePlant</code> creature, but don't worry too much about how that works just yet.</p>
|
||||||
<pre><code class="language-javascript">// create a simple plant creature
|
<pre><code class="language-javascript">// create a simple plant creature
|
||||||
factory.registerCreature({
|
terra.registerCreature({
|
||||||
type: 'simplePlant',
|
type: 'simplePlant',
|
||||||
color: [166, 226, 46],
|
color: [166, 226, 46],
|
||||||
size: 10,
|
size: 10,
|
||||||
|
Loading…
Reference in New Issue
Block a user