render HTML after removing bold code

This commit is contained in:
Landon Curt Noll committed 2024-03-19 21:20:52 -07:00
1 parent ec6dc7187e
commit 8a8140f089
8 files changed
+51 -66

No files matched your search

+3 -3
View File
@@ -126,9 +126,9 @@ to any other version of Snake), this file shows just how extreme cannibalism can
get with a long snake. I made a few changes, described below, to make it easier
to distinguish what is what.</p>
<h1 id="examples">Examples</h1>
<p>In the below game dumps I have replaced the bug with <strong><code>B</code></strong>, the head with
<strong><code>H</code></strong> and where it is known, the tail with <strong><code>T</code></strong>, in order to help
distinguish where they are. Since the head is replaced with <strong><code>H</code></strong> I have noted
<p>In the below game dumps I have replaced the bug with <strong>B</strong>, the head with
<strong>H</strong> and where it is known, the tail with <strong>T</strong>, in order to help
distinguish where they are. Since the head is replaced with <strong>H</strong> I have noted
the direction it was moving above each dump as well as at the right of the line;
each line with a bug, the head or tail is marked with upper case text at the
right to make it easier to find.</p>
+4 -4
View File
@@ -441,11 +441,11 @@ including how to find the bug, head and tail of the snake, at least where it was
documented. The first run has several dumps. The final example has the snake
inside itself.</p>
<h1 id="gameplay-shedding-stretching"><a name="shedding" href="#toc">Gameplay: Shedding (stretching)</a></h1>
<p>This feature will make you grow by the value of <strong><code>SHEDS</code></strong> for every <strong><code>SHED</code></strong>
<p>This feature will make you grow by the value of <strong>SHEDS</strong> for every <strong>SHED</strong>
movements (the counter isn’t incremented when you eat a bug). Basically growing
without eating a bug (stretching would be better name here).</p>
<h1 id="gameplay-winning"><a name="winning" href="#toc">Gameplay: Winning</a></h1>
<p>If you ever get to the <strong><code>MAXSIZE</code></strong> the game is won. You can force a win by
<p>If you ever get to the <strong>MAXSIZE</strong> the game is won. You can force a win by
setting the max size to a smaller value than the size you specify (or the
default) or setting the size to higher than the default (or &lt; 0 which will end
up being &gt; the max size though I suppose there might be some value that makes it
@@ -486,7 +486,7 @@ improved over time.</p>
the modes below.</p>
<h2 id="photosensitive-epilepsystimulation-overload-trigger-warnings"><a name="warning" href="#toc">Photosensitive epilepsy/Stimulation overload trigger warnings</a></h2>
<p>If you have <strong>photosensitive epilepsy please be careful</strong> especially with low values
for both <strong><code>WAIT</code></strong> and <strong><code>EVADE</code></strong>. It appears that the <a href="https://www.epilepsysociety.org.uk/photosensitive-epilepsy#.Xjgpwi2ZOgQ">number of hertz (flashes)
for both <strong>WAIT</strong> and <strong>EVADE</strong>. It appears that the <a href="https://www.epilepsysociety.org.uk/photosensitive-epilepsy#.Xjgpwi2ZOgQ">number of hertz (flashes)
per second triggering seizures</a> is wide but depending on the variables it
easily can be in the range.</p>
<p>There are different patterns and lights flashing at different speeds so please
@@ -674,7 +674,7 @@ gameplay modes (as shown above) but here are some general notes about a few of t
to a value that’s better for you. Remember it’s a wait time so if you want the
snake to move slower you have to increase the wait time!</p>
<h2 id="evade-bug-evasion-frequency"><a name="evade" href="#toc">EVADE: Bug evasion frequency</a></h2>
<p>For every <strong><code>EVADE</code></strong> snake movements the bug will try and find a new place to
<p>For every <strong>EVADE</strong> snake movements the bug will try and find a new place to
occupy. It might be very close to it and I do not ensure it’s a new place at
all.</p>
<p>Each time the bug is placed the counter will be reset whether from eating the
+21 -20
View File
@@ -152,50 +152,51 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
and non-zero).</p>
<h3 id="variables">Variables:</h3>
<ul>
<li><p><strong><code>WAIT</code></strong><br />
<li><p><strong>WAIT</strong><br />
positive or negative integer that changes how long to wait for
a key press prior to moving again. &lt; 0 blocks which allows
for complete control over movement at your own pace. Default
231; you can move faster by holding down or rapidly pressing an
arrow key.</p></li>
<li><p><strong><code>WALLS</code></strong><br />
<li><p><strong>WALLS</strong><br />
whether the walls are passable or impassable. Default passable,
1; 0 makes walls impassable where you die if you hit a wall.</p></li>
<li><p><strong><code>EVADE</code></strong><br />
<li><p><strong>EVADE</strong><br />
how many movements the Snake moves before the bug (well
insect; see notes below about why bugs) will move to
another location in the field. Default 300; 0 disables.</p></li>
<li><p><strong><code>SIZE</code></strong><br />
<li><p><strong>SIZE</strong><br />
initial size of the Snake. Note that it grows by one per
move so at the default 5 it will not initially be 5
characters long! &lt; 0 is likely an immediate win.</p></li>
<li><p><strong><code>MAXSIZE</code></strong><br />
<li><p><strong>MAXSIZE</strong><br />
the maximum size the Snake can become before the game is
won. &lt; 0 is the maximum size based on terminal dimensions;
any other size will be capped based on the terminal
dimensions to prevent problems. Note that when <strong><code>SIZE+GROW &gt;= MAXSIZE</code></strong> you win <em>before</em> you grow to the full size!</p></li>
<li><p><strong><code>GROW</code></strong><br />
dimensions to prevent problems. Note that when <strong>SIZE+GROW &gt;=
MAXSIZE</strong> you win <em>before</em> you grow to the full size!</p></li>
<li><p><strong>GROW</strong><br />
size to grow every time you eat a bug. Default 5; negative
values are allowed. ‘Negativity’ creates for fun gameplay modes with
enough creativity. See <a href="gameplay.html">gameplay.html</a>
GitHub) as well as <a href="play.sh">play.sh</a> for some examples.</p></li>
<li><p><strong><code>SHED</code></strong><br />
every <strong><code>SHED</code></strong> movements you will grow (&gt; 0), shrink (&lt; 0) or
stay the same length (0) by the <strong><code>SHEDS</code></strong> (below) value. Again
<li><p><strong>SHED</strong><br />
every <strong>SHED</strong> movements you will grow (&gt; 0), shrink (&lt; 0) or
stay the same length (0) by the <strong>SHEDS</strong> (below) value. Again
with creativity you can create some fun gameplay modes. NOTE:
the concept of shedding in this game is a misnomer; see notes
below.</p></li>
<li><p><strong><code>SHEDS</code></strong><br />
every <strong><code>SHED</code></strong> movements will impact what this value means: grow
<li><p><strong>SHEDS</strong><br />
every <strong>SHED</strong> movements will impact what this value means: grow
(&gt; 0), shrink (&lt; 0) or not at all (0). Exception: if the snake
eats a bug the counter isn’t incremented. Again with creativity
you can create some fun gameplay modes here. For instance you
can grow upon eating a bug but shrink every <strong><code>SHED</code></strong> movements
and then it’s a battle of whether you win by <strong><code>SIZE &lt; 0</code></strong> or
<strong><code>SIZE &gt;= MAXSIZE</code></strong>. See <a href="play.sh">play.sh</a> for examples.
can grow upon eating a bug but shrink every <strong>SHED</strong> movements
and then it’s a battle of whether you win by <strong>SIZE &lt; 0</strong> or
<strong>SIZE &gt;= MAXSIZE</strong>. See <a href="play.sh">play.sh</a> for examples.
NOTE: the concept of shedding in this game is a misnomer; see
notes below.</p></li>
<li><p><strong><code>CANNIBAL</code></strong><br />
<li><p><strong>CANNIBAL</strong><br />
whether you can go through the Snake or not. Default is 0
(cannot - die if you try).</p></li>
</ul>
@@ -260,17 +261,17 @@ some features! The variables mentioned in the to run section at the top of this
file modify the behaviour of Snake.</p>
<p>Here are some other features of the game:</p>
<ul>
<li><p>A drawing/practising mode (<strong><code>WAIT</code></strong> &lt; 0 makes <code>timeout()</code> block).</p></li>
<li><p>A drawing/practising mode (<strong>WAIT</strong> &lt; 0 makes <code>timeout()</code> block).</p></li>
<li><p>Computer plays the game (<strong>WAIT=0</strong>).<br />
</p>
<ul>
<li><strong>EPILEPSY/STIMULATION OVERLOAD WARNING</strong> included in the relevant
section (this goes for a low <strong><code>EVADE</code></strong> value too).</li>
section (this goes for a low <strong>EVADE</strong> value too).</li>
</ul></li>
<li><p>Grow-Shrink mode (Positive and Negative Winning) mode (see
<a href="gameplay.html">gameplay.html</a> for more details).</p></li>
<li><p>The dimensions of the game (this is actually a terminal thing but I document
how to do this and its potential pitfalls) (<strong><code>LINES</code></strong> , <strong><code>COLUMNS</code></strong>).</p></li>
how to do this and its potential pitfalls) (<strong>LINES</strong> , <strong>COLUMNS</strong>).</p></li>
</ul>
<p>There are no complicated command line invocations; it’s just a matter of passing
into the game descriptively named variables and I include a script that sets up
@@ -482,7 +483,7 @@ a pun and every pun deserves to be shed).</p>
<p>They grow through a process called moulting - shedding their skin (other
creatures also moult). This takes place over some days and unlike humans snakes
never stop growing (though growth slows down as they mature). I chose the
variables <strong><code>SHED</code></strong> and <strong><code>SHEDS</code></strong> for simplicity and because the words are
variables <strong>SHED</strong> and <strong>SHEDS</strong> for simplicity and because the words are
shorter. I don’t like the words because it’s rather a misnomer but what I had
chosen before was longer - STRETCH and STRETCHES.</p>
<h4 id="any-other-interesting-things-about-snakes"><a name="other" href="#toc">Any other interesting things about snakes?</a></h4>
+2 -2
View File
@@ -173,8 +173,8 @@ approximately the <code>snake_size / growth_size</code> i.e. how many bugs it
will take to win the game. The max bugs in the <code>bugs</code> line is approximately
<code>max_snake_size / growth_size</code> i.e. how many bugs it’ll take to win at the
maximum (capped) snake size.</p>
<p>If I pass in any of the variables <strong><code>GROW</code></strong>, <strong><code>MAXSIZE</code></strong>, <strong><code>SIZE</code></strong> and/or
<strong><code>LINES</code></strong> or <strong><code>COLUMNS</code></strong> it bases its calculations on those variables. For
<p>If I pass in any of the variables <strong>GROW</strong>, <strong>MAXSIZE</strong>, <strong>SIZE</strong> and/or
<strong>LINES</strong> or <strong>COLUMNS</strong> it bases its calculations on those variables. For
example:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">terminal</span> supports cursor movement</span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="ex">terminal</span> supports making cursor invisible</span>
+1 -1
View File
@@ -424,7 +424,7 @@ so that by setting the size to -1 it went to the max unsigned value):</p>
<div class="sourceCode" id="cb19"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a><span class="ex">$</span> MAXSIZE=-1 ./prog</span>
<span id="cb19-2"><a href="#cb19-2" aria-hidden="true" tabindex="-1"></a><span class="ex">memory</span> error</span>
<span id="cb19-3"><a href="#cb19-3" aria-hidden="true" tabindex="-1"></a><span class="ex">X:0/157</span> Y:0/42 S:3/18446744073709551614 B:0</span></code></pre></div>
<p>BTW: There are two arrays that have to be <strong><code>MAXSIZE</code></strong> (technically + 1).</p>
<p>BTW: There are two arrays that have to be <strong>MAXSIZE</strong> (technically + 1).</p>
<p>Is it possible that some value specified by the user could mess this up? I do
not know but what I do know is that because it’s unsigned it can’t be negative;
if the max size is 0 then the array size will be 1 but it won’t matter because