improve list formatting in 2020/ferguson1 markdown files

This commit is contained in:
Landon Curt Noll committed 2024-03-19 23:02:02 -07:00
1 parent 78863e5311
commit 25eae4b2db
17 files changed
+119 -238

No files matched your search

+18 -18
View File
@@ -144,27 +144,27 @@ snake’s syllabary) for all snake and herpetologist programmers alike.</p>
<ul>
<li><p>Modifications</p>
<ul>
<li><p>Modifying the colours</p></li>
<li><p>Background colour</p></li>
<li><p>Modifying the characters for the wall, bug and snake</p></li>
<li><p>Modifying input keys</p></li>
<li><p>Modifying the status/score line</p></li>
<li><p>Make it so the snake starts at a random location</p></li>
<li>Modifying the colours</li>
<li>Background colour</li>
<li>Modifying the characters for the wall, bug and snake</li>
<li>Modifying input keys</li>
<li>Modifying the status/score line</li>
<li>Make it so the snake starts at a random location</li>
</ul></li>
<li><p>Additions</p>
<ul>
<li><p>Health (and/or Lives)</p></li>
<li><p>Saving the game</p></li>
<li><p>Different types of walls</p></li>
<li><p>Blockades</p></li>
<li><p>Diagonal movement</p></li>
<li><p>Special abilities</p></li>
<li><p>Obstacles</p></li>
<li><p>More than one bug</p></li>
<li><p>Power-ups</p></li>
<li><p>Snakeskin shedding (becoming an obstacle)</p></li>
<li><p>Snake moves faster over time</p></li>
<li><p>Max times the bug evades before game over</p></li>
<li>Health (and/or Lives)</li>
<li>Saving the game</li>
<li>Different types of walls</li>
<li>Blockades</li>
<li>Diagonal movement</li>
<li>Special abilities</li>
<li>Obstacles</li>
<li>More than one bug</li>
<li>Power-ups</li>
<li>Snakeskin shedding (becoming an obstacle)</li>
<li>Snake moves faster over time</li>
<li>Max times the bug evades before game over</li>
</ul></li>
</ul>
<h1 id="modifications">Modifications</h1>
-14
View File
@@ -30,38 +30,24 @@ snake's syllabary) for all snake and herpetologist programmers alike.
- Modifying the colours
- Background colour
- Modifying the characters for the wall, bug and snake
- Modifying input keys
- Modifying the status/score line
- Make it so the snake starts at a random location
* Additions
- Health (and/or Lives)
- Saving the game
- Different types of walls
- Blockades
- Diagonal movement
- Special abilities
- Obstacles
- More than one bug
- Power-ups
- Snakeskin shedding (becoming an obstacle)
- Snake moves faster over time
- Max times the bug evades before game over
# Modifications
-11
View File
@@ -234,25 +234,15 @@ very important.
<a name="toc"></a>
* ['Bugs'](#bugs)
* [NAQs/IAQs (Never/Infrequently Asked Questions)](#naqs)
- [Do I have any inspirations for this entry?](#inspirations)
- [Are there any features I thought of that I wanted to implement but did not get to for some reason or another?](#features)
- [Are there ways that one can make this game easier?](#easier)
- [Are there ways to make it harder?](#harder)
- [How do snakes grow in real life?](#moult)
- [Any other interesting things about snakes?](#other)
- [Why can you go the opposite direction and so immediately die when not cannibalising?](#opposite)
- [Do you have any **DELICIOUS CHOCOLATE CAKE** recipes?](#chocolatecake)
- [What are the files prog.alt.c, prog.2.c, prog-j.c and prog.alt.c ?](#alt)
@@ -346,7 +336,6 @@ who plays it enjoys it as much as I enjoyed writing/playing it.
I can think of at the least the following:
- Bigger screen will allow for freer movement (at least for more time?).
- Increasing the movement (key press) wait to give you more time to choose
(though this slows gameplay down).
+9 -9
View File
@@ -123,15 +123,15 @@
<p>Current bugs and things that look like bugs but are not, as of 12 September 2020.</p>
<p><a name="toc"></a></p>
<ul>
<li><p><a href="#builtin-test-unit">Built-in test unit for some features!</a></p></li>
<li><p><a href="#stillsnake">The snake doesn’t seem to be moving</a></p></li>
<li><p><a href="#getch">getch() also accepts input from some input hardware other than keyboards</a></p></li>
<li><p><a href="#size">SIZE=0 is the same as SIZE=1 and other oddities</a></p></li>
<li><p><a href="#bitetail">‘I was a few places behind my tail and I ran into it!’</a></p></li>
<li><p><a href="#middleofsnake">With negative growth the snake drops from the middle of the body</a></p></li>
<li><p><a href="#buginsnake">It looks like the bug is in the snake</a></p></li>
<li><p><a href="#bugplacement">On the safety of the bug placement loop</a></p></li>
<li><p><a href="#verticalsnake">Vertical snake has more space between snake char than horizontal</a></p></li>
<li><a href="#builtin-test-unit">Built-in test unit for some features!</a></li>
<li><a href="#stillsnake">The snake doesn’t seem to be moving</a></li>
<li><a href="#getch">getch() also accepts input from some input hardware other than keyboards</a></li>
<li><a href="#size">SIZE=0 is the same as SIZE=1 and other oddities</a></li>
<li><a href="#bitetail">‘I was a few places behind my tail and I ran into it!’</a></li>
<li><a href="#middleofsnake">With negative growth the snake drops from the middle of the body</a></li>
<li><a href="#buginsnake">It looks like the bug is in the snake</a></li>
<li><a href="#bugplacement">On the safety of the bug placement loop</a></li>
<li><a href="#verticalsnake">Vertical snake has more space between snake char than horizontal</a></li>
</ul>
<h1 id="built-in-test-unit-for-some-features"><a name="builtin-test-unit" href="#toc">Built-in test unit for some features!</a></h1>
<p>Fun fact: There’s something of a built-in test unit for some features; much
-8
View File
@@ -3,21 +3,13 @@ Current bugs and things that look like bugs but are not, as of 12 September 2020
<a name="toc"></a>
- [Built-in test unit for some features!](#builtin-test-unit)
- [The snake doesn't seem to be moving](#stillsnake)
- [getch() also accepts input from some input hardware other than keyboards](#getch)
- [SIZE=0 is the same as SIZE=1 and other oddities](#size)
- ['I was a few places behind my tail and I ran into it!'](#bitetail)
- [With negative growth the snake drops from the middle of the body](#middleofsnake)
- [It looks like the bug is in the snake](#buginsnake)
- [On the safety of the bug placement loop](#bugplacement)
- [Vertical snake has more space between snake char than horizontal](#verticalsnake)
+24 -24
View File
@@ -130,38 +130,38 @@ for the input keys.</p>
<li><p><a href="#input">Input keys</a></p></li>
<li><p><a href="#gameplay">Gameplay</a></p>
<ul>
<li><p><a href="#initial">The initial screen</a></p></li>
<li><p><a href="#playing">Playing the game</a></p></li>
<li><p><a href="#walls">Walls</a></p></li>
<li><p><a href="#cannibalism">Cannibalism</a></p></li>
<li><p><a href="#shedding">Stretching (shedding)</a></p></li>
<li><p><a href="#winning">Winning</a></p></li>
<li><p><a href="#quitting">Quitting</a></p></li>
<li><a href="#initial">The initial screen</a></li>
<li><a href="#playing">Playing the game</a></li>
<li><a href="#walls">Walls</a></li>
<li><a href="#cannibalism">Cannibalism</a></li>
<li><a href="#shedding">Stretching (shedding)</a></li>
<li><a href="#winning">Winning</a></li>
<li><a href="#quitting">Quitting</a></li>
</ul></li>
<li><p><a href="#modes">Gameplay modes</a></p>
<ul>
<li><p><a href="#warning"><strong>Photosensitive epilepsy/Stimulation overload trigger warnings</strong></a></p></li>
<li><p><a href="#drawing">Drawing / Practice mode</a></p></li>
<li><p><a href="#auto">Computer playing / Automatic mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a></p>
<li><a href="#warning"><strong>Photosensitive epilepsy/Stimulation overload trigger warnings</strong></a></li>
<li><a href="#drawing">Drawing / Practice mode</a></li>
<li><a href="#auto">Computer playing / Automatic mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a>
<ul>
<li><a href="#auto-variations">Variations</a></li>
</ul></li>
<li><p><a href="#grow-shrink">Grow-Shrink (Positive/Negative Winning) mode</a></p></li>
<li><p><a href="#hypnotic">Hypnotic / Sleepy mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a></p></li>
<li><p><a href="#stim">Stimulation / Calming mode</a></p></li>
<li><p><a href="#other-ideas">Other ideas</a></p></li>
<li><a href="#grow-shrink">Grow-Shrink (Positive/Negative Winning) mode</a></li>
<li><a href="#hypnotic">Hypnotic / Sleepy mode (<strong>Photosensitive epilepsy/Stimulation overload trigger</strong>)</a></li>
<li><a href="#stim">Stimulation / Calming mode</a></li>
<li><a href="#other-ideas">Other ideas</a></li>
</ul></li>
<li><p><a href="#scripts">Scripts</a></p>
<ul>
<li><p><a href="#colours">Colours selection</a></p></li>
<li><p><a href="#preset">Automate the above gameplay modes</a></p></li>
<li><a href="#colours">Colours selection</a></li>
<li><a href="#preset">Automate the above gameplay modes</a></li>
</ul></li>
<li><p><a href="#variables">Other game variables</a></p>
<ul>
<li><p><a href="#wait">WAIT - Snake speed</a></p></li>
<li><p><a href="#evade">EVADE - Bug evasion frequency</a></p></li>
<li><p><a href="#sizes">SIZE / MAXSIZE - Initial snake / max sizes</a></p></li>
<li><p><a href="#growth">GROW / SHEDS - Growth / Shedding sizes</a></p></li>
<li><a href="#wait">WAIT - Snake speed</a></li>
<li><a href="#evade">EVADE - Bug evasion frequency</a></li>
<li><a href="#sizes">SIZE / MAXSIZE - Initial snake / max sizes</a></li>
<li><a href="#growth">GROW / SHEDS - Growth / Shedding sizes</a></li>
</ul></li>
<li><p><a href="#conclusions">Conclusion (and inspirational words for everyone)</a></p></li>
</ol>
@@ -174,12 +174,12 @@ include.</p>
(<a href="troubleshooting.md">troubleshooting.md</a> on GitHub) and <a href="bugs.html">bugs.html</a> (<a href="bugs.md">bugs.md</a> on GitHub).</p>
<h1 id="input-keys">2. <a name="input" href="#toc">Input keys</a></h1>
<ul>
<li><p>Left, right, up and down <strong>arrow keys</strong>: move that direction.</p></li>
<li><p><code>q</code> (and <code>Q</code>): quit the game.</p></li>
<li><p>Space: pause/resume the game (direction keys will also resume).
<li>Left, right, up and down <strong>arrow keys</strong>: move that direction.</li>
<li><code>q</code> (and <code>Q</code>): quit the game.</li>
<li>Space: pause/resume the game (direction keys will also resume).
Note that no other keys will resume the game; however if you press a key
that <code>getch()</code> picks up on and the game is not paused then it will be as if
you pressed the current direction key (assuming you already moved the snake).</p></li>
you pressed the current direction key (assuming you already moved the snake).</li>
</ul>
<h1 id="gameplay">3. <a name="gameplay" href="#toc">Gameplay</a></h1>
<p>Here I will show the initial screen as well as what a few things look like. If
+2 -22
View File
@@ -7,59 +7,41 @@ for the input keys.
1. [Testing terminal environment/capabilities](#support)
2. [Input keys](#input)
3. [Gameplay](#gameplay)
* [The initial screen](#initial)
* [Playing the game](#playing)
* [Walls](#walls)
* [Cannibalism](#cannibalism)
* [Stretching (shedding)](#shedding)
* [Winning](#winning)
* [Quitting](#quitting)
4. [Gameplay modes](#modes)
* [**Photosensitive epilepsy/Stimulation overload trigger warnings**](#warning)
* [Drawing / Practice mode](#drawing)
* [Computer playing / Automatic mode (**Photosensitive epilepsy/Stimulation overload trigger**)](#auto)
* [Variations](#auto-variations)
* [Grow-Shrink (Positive/Negative Winning) mode](#grow-shrink)
* [Hypnotic / Sleepy mode (**Photosensitive epilepsy/Stimulation overload trigger**)](#hypnotic)
* [Stimulation / Calming mode](#stim)
* [Other ideas](#other-ideas)
5. [Scripts](#scripts)
* [Colours selection](#colours)
* [Automate the above gameplay modes](#preset)
6. [Other game variables](#variables)
* [WAIT - Snake speed](#wait)
* [EVADE - Bug evasion frequency](#evade)
* [SIZE / MAXSIZE - Initial snake / max sizes](#sizes)
* [GROW / SHEDS - Growth / Shedding sizes](#growth)
@@ -80,9 +62,7 @@ For troubleshooting other problems see [troubleshooting.html][]
# 2. <a name="input" href="#toc">Input keys</a>
- Left, right, up and down **arrow keys**: move that direction.
- `q` (and `Q`): quit the game.
- Space: pause/resume the game (direction keys will also resume).
Note that no other keys will resume the game; however if you press a key
that `getch()` picks up on and the game is not paused then it will be as if
+12 -12
View File
@@ -320,20 +320,20 @@ important one, chocolate cake. Most important for the cake as the formatting is
very important.</p>
<p><a name="toc"></a></p>
<ul>
<li><p><a href="#bugs">‘Bugs’</a></p></li>
<li><p><a href="#naqs">NAQs/IAQs (Never/Infrequently Asked Questions)</a></p>
<li><a href="#bugs">‘Bugs’</a></li>
<li><a href="#naqs">NAQs/IAQs (Never/Infrequently Asked Questions)</a>
<ul>
<li><p><a href="#inspirations">Do I have any inspirations for this entry?</a></p></li>
<li><p><a href="#features">Are there any features I thought of that I wanted to implement but did not get to for some reason or another?</a></p></li>
<li><p><a href="#easier">Are there ways that one can make this game easier?</a></p></li>
<li><p><a href="#harder">Are there ways to make it harder?</a></p></li>
<li><p><a href="#moult">How do snakes grow in real life?</a></p></li>
<li><p><a href="#other">Any other interesting things about snakes?</a></p></li>
<li><p><a href="#opposite">Why can you go the opposite direction and so immediately die when not cannibalising?</a></p></li>
<li><p><a href="#chocolatecake">Do you have any <strong>DELICIOUS CHOCOLATE CAKE</strong> recipes?</a></p></li>
<li><p><a href="#alt">What are the files prog.alt.c, prog.2.c, prog-j.c and prog.alt.c ?</a></p></li>
<li><a href="#inspirations">Do I have any inspirations for this entry?</a></li>
<li><a href="#features">Are there any features I thought of that I wanted to implement but did not get to for some reason or another?</a></li>
<li><a href="#easier">Are there ways that one can make this game easier?</a></li>
<li><a href="#harder">Are there ways to make it harder?</a></li>
<li><a href="#moult">How do snakes grow in real life?</a></li>
<li><a href="#other">Any other interesting things about snakes?</a></li>
<li><a href="#opposite">Why can you go the opposite direction and so immediately die when not cannibalising?</a></li>
<li><a href="#chocolatecake">Do you have any <strong>DELICIOUS CHOCOLATE CAKE</strong> recipes?</a></li>
<li><a href="#alt">What are the files prog.alt.c, prog.2.c, prog-j.c and prog.alt.c ?</a></li>
</ul></li>
<li><p><a href="#winning">Winning thoughts, dedications and thanks</a></p></li>
<li><a href="#winning">Winning thoughts, dedications and thanks</a></li>
</ul>
<h3 id="bugs"><a name="bugs" href="#toc">‘Bugs’</a></h3>
<ul>
+14 -14
View File
@@ -133,17 +133,17 @@ wants to know more about it) read on. Yes I write a lot. But you probably
already knew that so no harm there, hey?</p>
<p><a name="toc"></a></p>
<ul>
<li><p><a href="#works">How does it work?</a></p></li>
<li><p><a href="#movement">How does the snake movement work?</a></p></li>
<li><p><a href="#manual-automatic">Drawing (manual) and computer playing (automatic) modes</a></p></li>
<li><p><a href="#collision">Collision detection</a></p>
<li><a href="#works">How does it work?</a></li>
<li><a href="#movement">How does the snake movement work?</a></li>
<li><a href="#manual-automatic">Drawing (manual) and computer playing (automatic) modes</a></li>
<li><a href="#collision">Collision detection</a>
<ul>
<li><p><a href="#cannibalcollision">Cannibal collision detection</a></p></li>
<li><p><a href="#resizing">Collision detection when resizing the window of the game</a></p></li>
<li><a href="#cannibalcollision">Cannibal collision detection</a></li>
<li><a href="#resizing">Collision detection when resizing the window of the game</a></li>
</ul></li>
<li><p><a href="#obfuscation">Obfuscation</a></p></li>
<li><p><a href="#skinning">Skinning the snake (i.e. decreasing the iocccsize)</a></p></li>
<li><p><a href="#size">A few more interesting size optimisations</a></p></li>
<li><a href="#obfuscation">Obfuscation</a></li>
<li><a href="#skinning">Skinning the snake (i.e. decreasing the iocccsize)</a></li>
<li><a href="#size">A few more interesting size optimisations</a></li>
</ul>
<h1 id="how-does-it-work"><a name="works" href="#toc">How does it work?</a></h1>
<p>The gameplay I have already described but this explains the way things are
@@ -711,11 +711,11 @@ be centred based on its length and the 120 columns for total. The preprocessor
directives should also be centred in that way (that was my goal anyway).</p>
<p>The following were intentional:</p>
<ul>
<li><p>53 lines.</p></li>
<li><p>The number of lines per vertical block (3, 5, 3, 11, 7, 1, 1, 5, 7).</p></li>
<li><p>Number of horizontal blocks (5)</p></li>
<li><p>Number of vertical blocks (9)</p></li>
<li><p>iocccsize 2053.</p></li>
<li>53 lines.</li>
<li>The number of lines per vertical block (3, 5, 3, 11, 7, 1, 1, 5, 7).</li>
<li>Number of horizontal blocks (5)</li>
<li>Number of vertical blocks (9)</li>
<li>iocccsize 2053.</li>
</ul>
<p>The symmetry was even more important to my mind; observe that each vertical
block (or column) starts and ends on the same column (or at least that was my
-15
View File
@@ -15,21 +15,13 @@ already knew that so no harm there, hey?
<a name="toc"></a>
- [How does it work?](#works)
- [How does the snake movement work?](#movement)
- [Drawing (manual) and computer playing (automatic) modes](#manual-automatic)
- [Collision detection](#collision)
* [Cannibal collision detection](#cannibalcollision)
* [Collision detection when resizing the window of the game](#resizing)
- [Obfuscation](#obfuscation)
- [Skinning the snake (i.e. decreasing the iocccsize)](#skinning)
- [A few more interesting size optimisations](#size)
@@ -206,7 +198,6 @@ in real life increases in size like that so suddenly? :)
# <a name="obfuscation" href="#toc">Obfuscation</a>
- I make use of the C token pasting operator. Although this is well known it's
probably less known and either way it's not as simple as just having the code
that it translates to. For example why have:
@@ -224,7 +215,6 @@ that it translates to. For example why have:
It also helps save iocccsize bytes (but not as many as it used to!).
- What is this block of code?
F(MAXSIZE)g d g = f((a)((*y-2)*(y[-2]-2)),g);
@@ -771,13 +761,9 @@ directives should also be centred in that way (that was my goal anyway).
The following were intentional:
* 53 lines.
* The number of lines per vertical block (3, 5, 3, 11, 7, 1, 1, 5, 7).
* Number of horizontal blocks (5)
* Number of vertical blocks (9)
* iocccsize 2053.
The symmetry was even more important to my mind; observe that each vertical
@@ -956,7 +942,6 @@ though because the score line is meant to display something, it squeezes a few
more bytes and having a space is hardly an imposition on usage (and for that
matter having a 'o' at 0,0 isn't either).
[gameplay.md]: gameplay.md
[gameplay.html]: gameplay.html
[HACKING.md]: HACKING.md
+12 -12
View File
@@ -126,21 +126,21 @@ file. I discuss terminal capabilities, dimensions (setting and how to restore
sanity if it causes any problems) as well as colours (limitations etc.).</p>
<p><a name="toc"></a></p>
<ul>
<li><p><a href="#termcaps">Capabilities support testing program</a></p></li>
<li><p><a href="#dimensions">Setting the game dimensions</a></p>
<li><a href="#termcaps">Capabilities support testing program</a></li>
<li><a href="#dimensions">Setting the game dimensions</a>
<ul>
<li><p><a href="#linescolumns">The LINES and COLUMNS environmental variables</a></p></li>
<li><p><a href="#insanity">Terminal insanity</a></p></li>
<li><p><a href="#restore">Restoring the terminal</a></p></li>
<li><p><a href="#abuse">Terminal size abuse</a></p></li>
<li><a href="#linescolumns">The LINES and COLUMNS environmental variables</a></li>
<li><a href="#insanity">Terminal insanity</a></li>
<li><a href="#restore">Restoring the terminal</a></li>
<li><a href="#abuse">Terminal size abuse</a></li>
</ul></li>
<li><p><a href="#termlimitations">Terminal limitations</a></p></li>
<li><p><a href="#colours">Terminal colours</a></p>
<li><a href="#termlimitations">Terminal limitations</a></li>
<li><a href="#colours">Terminal colours</a>
<ul>
<li><p><a href="#background">Curses background</a></p></li>
<li><p><a href="#monochrome">Monochrome terminals</a></p></li>
<li><p><a href="#colourlimitations">Colour limitations</a></p></li>
<li><p><a href="#disablecolour">Disabling colour</a></p></li>
<li><a href="#background">Curses background</a></li>
<li><a href="#monochrome">Monochrome terminals</a></li>
<li><a href="#colourlimitations">Colour limitations</a></li>
<li><a href="#disablecolour">Disabling colour</a></li>
</ul></li>
</ul>
<h1 id="capabilities-support-testing-program"><a name="termcaps" href="#toc">Capabilities support testing program</a></h1>
-12
View File
@@ -8,28 +8,16 @@ sanity if it causes any problems) as well as colours (limitations etc.).
<a name="toc"></a>
- [Capabilities support testing program](#termcaps)
- [Setting the game dimensions](#dimensions)
* [The LINES and COLUMNS environmental variables](#linescolumns)
* [Terminal insanity](#insanity)
* [Restoring the terminal](#restore)
* [Terminal size abuse](#abuse)
- [Terminal limitations](#termlimitations)
- [Terminal colours](#colours)
* [Curses background](#background)
* [Monochrome terminals](#monochrome)
* [Colour limitations](#colourlimitations)
* [Disabling colour](#disablecolour)
+12 -14
View File
@@ -128,20 +128,18 @@ more thorough description and any resolutions (from easiest to hardest). For
anything that can cause more than one issue I will list those separately to keep
it as structured as possible/easiest to find.</p>
<p><a name="toc"></a>
- <a href="#topwall">The top wall isn’t (all/some of the time) visible!</a></p>
<ul>
<li><p><a href="#notmoving">The snake isn’t moving!</a></p></li>
<li><p><a href="#invisiblehead">I can’t see the snake head (or other part of the snake)!</a></p></li>
<li><p><a href="#invisiblebug">I can’t see the bug!</a></p></li>
<li><p><a href="#froze">The game froze!</a></p></li>
<li><p><a href="#bigsnake">The game gets slower as the snake gets bigger!</a></p></li>
<li><p><a href="#headonly">I set SIZE=0 GROW=1, ate a bug but still only the head was visible! Why?</a></p></li>
<li><p><a href="#monochrome">I like black text on a white background but even with a white background terminal it ends up black!</a></p></li>
<li><p><a href="#toodark">The text is hard to see (not bright enough)!</a></p></li>
<li><p><a href="#movefaster">Can I move the snake faster temporarily without having to modify the wait time?</a></p></li>
<li><p><a href="#envvars">On environmental variables more generally and string to int conversions</a></p></li>
<li><p><a href="#errors">Errors and error reporting</a></p></li>
</ul>
- <a href="#topwall">The top wall isn’t (all/some of the time) visible!</a>
- <a href="#notmoving">The snake isn’t moving!</a>
- <a href="#invisiblehead">I can’t see the snake head (or other part of the snake)!</a>
- <a href="#invisiblebug">I can’t see the bug!</a>
- <a href="#froze">The game froze!</a>
- <a href="#bigsnake">The game gets slower as the snake gets bigger!</a>
- <a href="#headonly">I set SIZE=0 GROW=1, ate a bug but still only the head was visible! Why?</a>
- <a href="#monochrome">I like black text on a white background but even with a white background terminal it ends up black!</a>
- <a href="#toodark">The text is hard to see (not bright enough)!</a>
- <a href="#movefaster">Can I move the snake faster temporarily without having to modify the wait time?</a>
- <a href="#envvars">On environmental variables more generally and string to int conversions</a>
- <a href="#errors">Errors and error reporting</a></p>
<h2 id="the-top-wall-isnt-allsome-of-the-time-visible"><a name="topwall" href="#toc">The top wall isn’t (all/some of the time) visible!</a></h2>
<p>Because the score line is dynamic in length depending on the terminal size it
can happen that the score/status wraps to the next line(s). This can be fixed by
-11
View File
@@ -9,27 +9,16 @@ it as structured as possible/easiest to find.
<a name="toc"></a>
- [The top wall isn't (all/some of the time) visible!](#topwall)
- [The snake isn't moving!](#notmoving)
- [I can't see the snake head (or other part of the snake)!](#invisiblehead)
- [I can't see the bug!](#invisiblebug)
- [The game froze!](#froze)
- [The game gets slower as the snake gets bigger!](#bigsnake)
- [I set SIZE=0 GROW=1, ate a bug but still only the head was visible! Why?](#headonly)
- [I like black text on a white background but even with a white background terminal it ends up black!](#monochrome)
- [The text is hard to see (not bright enough)!](#toodark)
- [Can I move the snake faster temporarily without having to modify the wait time?](#movefaster)
- [On environmental variables more generally and string to int conversions](#envvars)
- [Errors and error reporting](#errors)
-11
View File
@@ -161,28 +161,17 @@ I have more information on this entry like the testing procedure at
<a name="toc"></a>
- [IOCCC: an Enigma?](#ioccc)
- [The 1992 Nathan Sidwell entry](#nathan)
- [Usage](#usage)
* [Example run](#example)
- [The recode.c configurator](#recode)
- [A parser subtlety that could cause confusion](#parsersubtlety)
- [On the source code layout](#layout)
- [Obfuscation](#obfuscation)
- [Bugs, limitations, differences from the real Enigma machines and general notes](#bugs)
- [Kriegsmarine support?](#kriegsmarine)
- [Portability](#portability)
- [Winning thoughts, dedications and thanks](#winning)
- [Resources](#resources)
### <a name="ioccc" href="#toc">IOCCC: an Enigma?</a>
+16 -16
View File
@@ -130,24 +130,24 @@ you could look at my <a href="../ferguson1/prog.c">Snake entry ‘Don’t tread
award</a> since it’s also there and not enciphered.</p>
<p><a name="toc"></a></p>
<ul>
<li><p><a href="#recode">What is recode and why is it recommended?</a></p></li>
<li><p><a href="#options">Options</a></p>
<li><a href="#recode">What is recode and why is it recommended?</a></li>
<li><a href="#options">Options</a>
<ul>
<li><p><a href="#samefile">Protecting against the same I/O file</a></p></li>
<li><p><a href="#fileoptions">File options parser limitation</a></p></li>
<li><p><a href="#validation"><code>-R</code> option validation?</a></p></li>
<li><a href="#samefile">Protecting against the same I/O file</a></li>
<li><a href="#fileoptions">File options parser limitation</a></li>
<li><a href="#validation"><code>-R</code> option validation?</a></li>
</ul></li>
<li><p><a href="#pipingtorecode">Piping commands to recode</a></p></li>
<li><p><a href="#pipingtoenigma">Piping recode to the Enigma simulator</a></p></li>
<li><p><a href="#manuallytest">Manually test the recode program with the Enigma program</a></p></li>
<li><p><a href="#onlyconfig">Only write config file</a></p></li>
<li><p><a href="#reuseconfig">Reusing a configuration</a></p></li>
<li><p><a href="#passtoenigma">Write config file, read data file and pass to Enigma simulator</a></p></li>
<li><p><a href="#directlytoenigma">Piping directly to the Enigma code once (with randomised settings, saved)</a></p></li>
<li><p><a href="#conclusion">Usage conclusion</a></p></li>
<li><p><a href="#additions">Example additions</a></p></li>
<li><p><a href="#exampleuses">Example uses</a></p></li>
<li><p><a href="#cake">Deliciously Enigmatic: Double-layered Chocolate Fudge Cake</a></p></li>
<li><a href="#pipingtorecode">Piping commands to recode</a></li>
<li><a href="#pipingtoenigma">Piping recode to the Enigma simulator</a></li>
<li><a href="#manuallytest">Manually test the recode program with the Enigma program</a></li>
<li><a href="#onlyconfig">Only write config file</a></li>
<li><a href="#reuseconfig">Reusing a configuration</a></li>
<li><a href="#passtoenigma">Write config file, read data file and pass to Enigma simulator</a></li>
<li><a href="#directlytoenigma">Piping directly to the Enigma code once (with randomised settings, saved)</a></li>
<li><a href="#conclusion">Usage conclusion</a></li>
<li><a href="#additions">Example additions</a></li>
<li><a href="#exampleuses">Example uses</a></li>
<li><a href="#cake">Deliciously Enigmatic: Double-layered Chocolate Fudge Cake</a></li>
</ul>
<h1 id="what-is-recode-and-why-is-it-recommended"><a name="recode" href="#toc">What is recode and why is it recommended?</a></h1>
<p>To demonstrate how to and why you should use the <a href="recode.c">recode</a> program with
-15
View File
@@ -13,35 +13,20 @@ award](../ferguson1/prog.c) since it's also there and not enciphered.
<a name="toc"></a>
- [What is recode and why is it recommended?](#recode)
- [Options](#options)
* [Protecting against the same I/O file](#samefile)
* [File options parser limitation](#fileoptions)
* [`-R` option validation?](#validation)
- [Piping commands to recode](#pipingtorecode)
- [Piping recode to the Enigma simulator](#pipingtoenigma)
- [Manually test the recode program with the Enigma program](#manuallytest)
- [Only write config file](#onlyconfig)
- [Reusing a configuration](#reuseconfig)
- [Write config file, read data file and pass to Enigma simulator](#passtoenigma)
- [Piping directly to the Enigma code once (with randomised settings, saved)](#directlytoenigma)
- [Usage conclusion](#conclusion)
- [Example additions](#additions)
- [Example uses](#exampleuses)
- [Deliciously Enigmatic: Double-layered Chocolate Fudge Cake](#cake)