improved indentation and whitespace for markdown code blocks

All code blocks in markdown have been intended by at least 4 spaces.

We add `--tab-stop=8` to all `pandoc(1)` executions in order to set
a better tab stop indentation, especially for tab intended code blocks.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26"
to "1.6 2024-03-31".

Fixed `1991/brnstnd/sorta.README.md` so that the sorta code
is code blocks.

Removed unneeded paragraph group in copyright in `inc/footer.default.html`.

Fixed excess whitespace after list Author on entry `index.html` page.

Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26"
to "1.6 2024-03-31".

Performed `make www` to perform the above and test under macOS.

TODO: Fix the problem of the initial line of code being extra intended.
TODO: Fix excess whitespace around code that is inline.
This commit is contained in:
Landon Curt Noll committed 2024-04-01 04:48:48 -07:00
1 parent b84c27ce02
commit a996f8d2b8
734 files changed
+16723 -16963

No files matched your search

+27 -27
View File
@@ -1,7 +1,7 @@
## To build:
```sh
make
make
```
There is an alternate version provided by the author. See [Alternate
@@ -11,24 +11,24 @@ code](#alternate-code) below.
## To use:
```sh
# IMPORTANT for macOS: run under Terminal.app
# IMPORTANT for macOS: run under Terminal.app
./prog
./prog
```
## Try:
```sh
# IMPORTANT for macOS: run under Terminal.app
# IMPORTANT for macOS: run under Terminal.app
# Try resizing the terminal window before the first click.
# Try resizing the terminal window before the first click.
# Try resizing the terminal window after the first click.
# Try resizing the terminal window after the first click.
./prog ioccc.txt
./prog ioccc.txt
./prog unwinnable.txt
./prog unwinnable.txt
```
@@ -42,7 +42,7 @@ Author's remarks for more details.
### Alternate build:
```sh
make alt
make alt
```
@@ -95,8 +95,8 @@ All you have to do is (0). You can test if you are lucky or not.
It uses ncurses:
```sh
gcc -o prog prog.c -lncurses
./prog
gcc -o prog prog.c -lncurses
./prog
```
You will see a terminal-wide field of a minesweeper. Probe a cell by mouse
@@ -127,9 +127,9 @@ unprobed neighbors are probed.
Example:
```
? ? ? . . .
? 3 ? => . 3 .
! ! ! ! ! !
? ? ? . . .
? 3 ? => . 3 .
! ! ! ! ! !
```
Note that `?` is an unprobed cell (it is unknown whether the cell has a mine or
@@ -145,9 +145,9 @@ neighbors, all the unprobed neighbors are flagged.
Example:
```
. ? ? . ! !
. 4 ? => . 4 !
. 2 ! . 2 !
. ? ? . ! !
. 4 ? => . 4 !
. 2 ! . 2 !
```
#### Rule 3:
@@ -159,10 +159,10 @@ neighbors, all `A`'s unprobed neighbors that are not `B`'s neighbors are probed.
Example:
```
? ? ? . . .
? 1 ? ? => . 1 ? ?
? ? 4 . . ? 4 .
? . ! ? . !
? ? ? . . .
? 1 ? ? => . 1 ? ?
? ? 4 . . ? 4 .
? . ! ? . !
```
`A` and `B` are probed cells whose numbers are, respectively, 1 and 4. The
@@ -179,9 +179,9 @@ neighbors, all of `A`'s unprobed neighbors that are not `B`'s neighbors are
flagged.
```
? ? ? ? ! ? ? ?
? 3 1 2 => ! 3 1 2
2 2 . . 2 2 . .
? ? ? ? ! ? ? ?
? 3 1 2 => ! 3 1 2
2 2 . . 2 2 . .
```
`A` and `B` are probed cells whose numbers are, respectively, 3 and 1. The
@@ -201,13 +201,13 @@ Analyze the code.
You can also play with a prepared map.
```sh
./prog ioccc.txt
```
./prog ioccc.txt
```
The format of the text is:
```
width height number-of-mines priorities-of-each-cell...
width height number-of-mines priorities-of-each-cell...
```
There are mines in a cell whose "priorities-of-each-cell" is less than
+27 -28
View File
@@ -132,8 +132,7 @@
<h2 id="author"><a name="author"></a>Author:</h2>
<ul>
<li>Name: <a href="../../authors.html#Yusuke_Endoh">Yusuke Endoh</a><br>
Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
<br><br></li>
Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em></li>
</ul>
<!-- END: next line ends content generated by: bin/output-index-author.sh -->
@@ -142,29 +141,29 @@ Location: <a href="../../location.html#JP">JP</a> - <em>Japan</em>
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<h2 id="to-build">To build:</h2>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span></span></code></pre></div>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span></span></code></pre></div>
<p>There is an alternate version provided by the author. See <a href="#alternate-code">Alternate
code</a> below.</p>
<h2 id="to-use">To use:</h2>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="co"># IMPORTANT for macOS: run under Terminal.app</span></span>
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a> <span class="co"># IMPORTANT for macOS: run under Terminal.app</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span></span></code></pre></div>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span></span></code></pre></div>
<h2 id="try">Try:</h2>
<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="co"># IMPORTANT for macOS: run under Terminal.app</span></span>
<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="co"># IMPORTANT for macOS: run under Terminal.app</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="co"># Try resizing the terminal window before the first click.</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a> <span class="co"># Try resizing the terminal window before the first click.</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="co"># Try resizing the terminal window after the first click.</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> <span class="co"># Try resizing the terminal window after the first click.</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> ioccc.txt</span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> ioccc.txt</span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span> unwinnable.txt</span></code></pre></div>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> unwinnable.txt</span></code></pre></div>
<h2 id="alternate-code">Alternate code:</h2>
<p>An alternate version of this entry, <a href="prog.alt.c">prog.alt.c</a>, is provided. This
alternate code lacks the additional rule to flag all unprobed cells. See the
Author’s remarks for more details.</p>
<h3 id="alternate-build">Alternate build:</h3>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">make</span> alt</span></code></pre></div>
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
<h3 id="alternate-use">Alternate use:</h3>
<p>Use <code>prog.alt</code> as you would <code>prog</code> above.</p>
<h2 id="judges-remarks">Judges’ remarks:</h2>
@@ -195,8 +194,8 @@ such a boring task!</p>
All you have to do is (0). You can test if you are lucky or not.</p>
<h3 id="how-to-use">How to use:</h3>
<p>It uses ncurses:</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">gcc</span> <span class="at">-o</span> prog prog.c <span class="at">-lncurses</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="ex">./prog</span></span></code></pre></div>
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> <span class="at">-o</span> prog prog.c <span class="at">-lncurses</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span></span></code></pre></div>
<p>You will see a terminal-wide field of a minesweeper. Probe a cell by mouse
click.</p>
<p>If a cell turns out to have a mine (or not), the program determines whether its
@@ -213,9 +212,9 @@ neighbors have a mine or not, and automatically probes (or flags) the cell.</p>
<p>If the number of a cell is equal to the count of the flagged neighbors, all the
unprobed neighbors are probed.</p>
<p>Example:</p>
<pre><code>? ? ? . . .
? 3 ? =&gt; . 3 .
! ! ! ! ! !</code></pre>
<pre><code> ? ? ? . . .
? 3 ? =&gt; . 3 .
! ! ! ! ! !</code></pre>
<p>Note that <code>?</code> is an unprobed cell (it is unknown whether the cell has a mine or
not); <code>!</code> is a flagged cell (it is already known that the cell has a mine); and
<code>.</code> is a probed cell (it is already known that the cell has no mine).</p>
@@ -223,18 +222,18 @@ not); <code>!</code> is a flagged cell (it is already known that the cell has a
<p>If the number of a cell is equal to the count of the unprobed or flagged
neighbors, all the unprobed neighbors are flagged.</p>
<p>Example:</p>
<pre><code>. ? ? . ! !
. 4 ? =&gt; . 4 !
. 2 ! . 2 !</code></pre>
<pre><code> . ? ? . ! !
. 4 ? =&gt; . 4 !
. 2 ! . 2 !</code></pre>
<h4 id="rule-3">Rule 3:</h4>
<p>Consider two number cells <code>A</code> and <code>B</code>. If <code>A</code> is equal to the difference of <code>B</code>
and the count of <code>B</code>’s unprobed and flagged neighbors that are not <code>A</code>’s
neighbors, all <code>A</code>’s unprobed neighbors that are not <code>B</code>’s neighbors are probed.</p>
<p>Example:</p>
<pre><code>? ? ? . . .
? 1 ? ? =&gt; . 1 ? ?
? ? 4 . . ? 4 .
? . ! ? . !</code></pre>
<pre><code> ? ? ? . . .
? 1 ? ? =&gt; . 1 ? ?
? ? 4 . . ? 4 .
? . ! ? . !</code></pre>
<p><code>A</code> and <code>B</code> are probed cells whose numbers are, respectively, 1 and 4. The
count of <code>B</code>’s unprobed and flagged neighbors that are not <code>A</code>’s neighbors is
three (one <code>!</code> and two <code>?</code>s). Since <code>A == B - count</code> (<code>1 == 4 - 3</code>), the left
@@ -244,9 +243,9 @@ and top unprobed cells are probed.</p>
and the count of <code>A</code>’s unprobed and flagged neighbors that are not <code>B</code>’s
neighbors, all of <code>A</code>’s unprobed neighbors that are not <code>B</code>’s neighbors are
flagged.</p>
<pre><code>? ? ? ? ! ? ? ?
? 3 1 2 =&gt; ! 3 1 2
2 2 . . 2 2 . .</code></pre>
<pre><code> ? ? ? ? ! ? ? ?
? 3 1 2 =&gt; ! 3 1 2
2 2 . . 2 2 . .</code></pre>
<p><code>A</code> and <code>B</code> are probed cells whose numbers are, respectively, 3 and 1. The
count of <code>A</code>’s unprobed and flagged neighbors that are not <code>B</code>’s neighbors is
two (left <code>?</code>s). Since <code>B == A - count</code> (<code>1 == 3 - 2</code>), the left unprobed cells
@@ -256,9 +255,9 @@ are flagged.</p>
Analyze the code.</p>
<h3 id="one-more-thing">One more thing</h3>
<p>You can also play with a prepared map.</p>
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> ioccc.txt</span></code></pre></div>
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./prog</span> ioccc.txt</span></code></pre></div>
<p>The format of the text is:</p>
<pre><code>width height number-of-mines priorities-of-each-cell...</code></pre>
<pre><code> width height number-of-mines priorities-of-each-cell...</code></pre>
<p>There are mines in a cell whose “priorities-of-each-cell” is less than
“number-of-mines”. (But the mine in the first-clicked cell is removed.)</p>
<h3 id="bug-fixes-and-credits">Bug fixes and Credits</h3>