diff --git a/2020/ferguson1/README.md b/2020/ferguson1/README.md index d00bccbe9..19849ff9e 100644 --- a/2020/ferguson1/README.md +++ b/2020/ferguson1/README.md @@ -29,60 +29,60 @@ and non-zero). ### Variables: * **WAIT**
- positive or negative integer that changes how long to wait for - a key press prior to moving again. < 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. + positive or negative integer that changes how long to wait for + a key press prior to moving again. < 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. * **WALLS**
- whether the walls are passable or impassable. Default passable, - 1; 0 makes walls impassable where you die if you hit a wall. + whether the walls are passable or impassable. Default passable, + 1; 0 makes walls impassable where you die if you hit a wall. * **EVADE**
- 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. + 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. * **SIZE**
- 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! < 0 is likely an immediate win. + 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! < 0 is likely an immediate win. * **MAXSIZE**
- the maximum size the Snake can become before the game is - won. < 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 **SIZE+GROW >= - MAXSIZE** you win _before_ you grow to the full size! + the maximum size the Snake can become before the game is + won. < 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 **SIZE+GROW >= + MAXSIZE** you win _before_ you grow to the full size! * **GROW**
- 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 [gameplay.html](gameplay.html) - GitHub) as well as [play.sh](play.sh) for some examples. + 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 [gameplay.html](gameplay.html) + GitHub) as well as [play.sh](play.sh) for some examples. * **SHED**
- every **SHED** movements you will grow (> 0), shrink (< 0) or - stay the same length (0) by the **SHEDS** (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. + every **SHED** movements you will grow (> 0), shrink (< 0) or + stay the same length (0) by the **SHEDS** (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. * **SHEDS**
- every **SHED** movements will impact what this value means: grow - (> 0), shrink (< 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 **SHED** movements - and then it's a battle of whether you win by **SIZE < 0** or - **SIZE >= MAXSIZE**. See [play.sh](play.sh) for examples. - NOTE: the concept of shedding in this game is a misnomer; see - notes below. + every **SHED** movements will impact what this value means: grow + (> 0), shrink (< 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 **SHED** movements + and then it's a battle of whether you win by **SIZE < 0** or + **SIZE >= MAXSIZE**. See [play.sh](play.sh) for examples. + NOTE: the concept of shedding in this game is a misnomer; see + notes below. * **CANNIBAL**
- whether you can go through the Snake or not. Default is 0 - (cannot - die if you try). + whether you can go through the Snake or not. Default is 0 + (cannot - die if you try). ## Try: @@ -274,11 +274,11 @@ On a more serious note look at [bugs.html](bugs.html).
-### NAQs/IAQs (Never/Infrequently Asked Questions) +### NAQs/IAQs (Never/Infrequently Asked Questions)
-#### Do I have any inspirations for this entry? +#### Do I have any inspirations for this entry?
There are two in particular. First is a long time mate of mine wrote a bash @@ -315,7 +315,7 @@ Snake in several ways.
-#### Are there any features I thought of that I wanted to implement but did not get to for some reason or another? +#### Are there any features I thought of that I wanted to implement but did not get to for some reason or another?
Yes. I thought it would be fun if there were other obstacles for the snake (in @@ -341,7 +341,7 @@ who plays it enjoys it as much as I enjoyed writing/playing it.
-#### Are there ways that one can make this game easier? +#### Are there ways that one can make this game easier?
I can think of at the least the following: @@ -379,7 +379,7 @@ I can think of at the least the following:
-#### Are there ways to make it harder? +#### Are there ways to make it harder?
- Decrease the size of the game. @@ -429,7 +429,7 @@ a pun and every pun deserves to be shed).
-#### How do snakes grow in real life? +#### How do snakes grow in real life?
They grow through a process called moulting - shedding their skin (other @@ -440,7 +440,7 @@ shorter. I don't like the words because it's rather a misnomer but what I had chosen before was longer - STRETCH and STRETCHES.
-#### Any other interesting things about snakes? +#### Any other interesting things about snakes?
For the fascinating science behind snake slithering see [Snake walk: The physics @@ -451,7 +451,7 @@ do not know) and they really do tell the truth as they see it (even if impossible).
-#### Why can you go the opposite direction and so immediately die when not cannibalising? +#### Why can you go the opposite direction and so immediately die when not cannibalising?
When Ilya Kurdyukov was playing with this he questioned why this is possible @@ -476,7 +476,7 @@ walls passable and not worry about dying.
-#### Do you have any **DELICIOUS CHOCOLATE CAKE** recipes? +#### Do you have any **DELICIOUS CHOCOLATE CAKE** recipes?
Why yes I do! So good in fact that even my late stepmum who didn't even like @@ -510,7 +510,7 @@ been warned.
-#### What are the files prog.2.c, prog.3.c, prog.3-j.c and prog.alt.c ? +#### What are the files prog.2.c, prog.3.c, prog.3-j.c and prog.alt.c ?
I submitted three Snake versions; these are the other layouts for those few @@ -532,7 +532,7 @@ both do. ## Author's dedication:
-### Winning thoughts, dedications and thanks +### Winning thoughts, dedications and thanks
Once again I'm honoured to win along with some of the other veterans who I have diff --git a/2020/ferguson1/index.html b/2020/ferguson1/index.html index 9d2a4523f..5cb79dd75 100644 --- a/2020/ferguson1/index.html +++ b/2020/ferguson1/index.html @@ -616,10 +616,10 @@ unsigned arithmetic.

On a more serious note look at bugs.html.

-

NAQs/IAQs (Never/Infrequently Asked Questions)

+

NAQs/IAQs (Never/Infrequently Asked Questions)

-

Do I have any inspirations for this entry?

+

Do I have any inspirations for this entry?

There are two in particular. First is a long time mate of mine wrote a bash implementation of Snake several years ago (uncoloured, no cheat modes, hardcoded @@ -649,7 +649,7 @@ it was done in Sur inspired the shedding mode. Anyway I always loved the game and it’s similar to Snake in several ways.

-

Are there any features I thought of that I wanted to implement but did not get to for some reason or another?

+

Are there any features I thought of that I wanted to implement but did not get to for some reason or another?

Yes. I thought it would be fun if there were other obstacles for the snake (in my mind I was thinking of barriers like the walls but in the field).

@@ -668,7 +668,7 @@ not show the arrows but then that brings an old problem back.

Nevertheless I am quite happy with the features in the game and I hope everyone who plays it enjoys it as much as I enjoyed writing/playing it.

-

Are there ways that one can make this game easier?

+

Are there ways that one can make this game easier?

I can think of at the least the following:

-

Are there ways to make it harder?

+

Are there ways to make it harder?

-

What are the files prog.2.c, prog.3.c, prog.3-j.c and prog.alt.c ?

+

What are the files prog.2.c, prog.3.c, prog.3-j.c and prog.alt.c ?

I submitted three Snake versions; these are the other layouts for those few (more likely none) who are interested to see them.

@@ -829,7 +829,7 @@ first, clearing the screen, which the play.sh and snake-colours.sh scripts also both do.

Author’s dedication:

-

Winning thoughts, dedications and thanks

+

Winning thoughts, dedications and thanks

Once again I’m honoured to win along with some of the other veterans who I have a huge amount of respect for; there’s Don Yang, Dave diff --git a/2020/ferguson2/README.md b/2020/ferguson2/README.md index 70d04fa90..02f68776a 100644 --- a/2020/ferguson2/README.md +++ b/2020/ferguson2/README.md @@ -116,12 +116,12 @@ There is a good deal of useful documentation that is provided with this entry: * [recode.html][] (or [recode.html](recode.html) if reading on GitHub) - - Some useful information about [recode.c](recode.c) + - Some useful information about [recode.c](recode.c) * [chocolate-cake.html][] (or [chocolate-cake.html](chocolate-cake.html) if reading on GitHub) - - Because most of us could use some *Double-layered Chocolate Fudge Cake*! - - NOTE: see [recode.html][] (or [recode.html](recode.html) for details about how to decrypt this! + - Because most of us could use some *Double-layered Chocolate Fudge Cake*! + - NOTE: see [recode.html][] (or [recode.html](recode.html) for details about how to decrypt this! [recode.html]: recode.html @@ -175,7 +175,7 @@ I have more information on this entry like the testing procedure at

-### IOCCC: an Enigma? +### IOCCC: an Enigma?
Is there a better single word that could describe the code that is IOCCC? I'm @@ -209,7 +209,7 @@ With my entry we can complete the loop!
-### The 1992 Nathan Sidwell entry +### The 1992 Nathan Sidwell entry
The author [Nathan Sidwell](../../authors.html#Nathan_Sidwell) of the [1992 Worst @@ -251,7 +251,7 @@ leave this in for historical purposes.
-### Usage +### Usage
If you run the program by itself it'll use the default settings and prompt you @@ -282,7 +282,7 @@ pairs](https://www.cryptomuseum.com/crypto/enigma/i/sb.htm). After that you can input the string and it'll go from there.
-#### Example run +#### Example run
BTW: There's a much more entertaining (and delicious) challenge or exercise in @@ -413,7 +413,7 @@ What about the other [Morse code entry](../../1998/dorssel/dorssel.c)? ```
-### The recode.c configurator +### The recode.c configurator
I have included a supplementary program [recode.c][] that can do a number of @@ -449,7 +449,7 @@ For examples using it (and a delicious challenge) see [recode.html][] (or
-### A parser subtlety that could cause confusion +### A parser subtlety that could cause confusion
The parser is in a sense rather rudimentary but allows for both interactive and @@ -527,7 +527,7 @@ accomplished and made use of! :) ```
-### On the source code layout +### On the source code layout
The layout of [recode.c][] isn't too significant (but see below) but I want to @@ -563,7 +563,7 @@ As for [recode.c][] though I really love this:
-### Obfuscation +### Obfuscation
@@ -602,7 +602,7 @@ word `OBFUSCATION`: ```
-### Bugs, limitations, differences from the real Enigma machines and general notes +### Bugs, limitations, differences from the real Enigma machines and general notes
Ways that my simulator differs from the real thing. Not all of these are bugs @@ -698,7 +698,7 @@ to have it at A but again I do not know.
-### Kriegsmarine support? +### Kriegsmarine support?
Is it possible to add [Kriegsmarine](https://en.wikipedia.org/wiki/Kriegsmarine) @@ -727,7 +727,7 @@ greatly.
-### Portability +### Portability
I have tested it under macOS, Fedora and CentOS Linux and all seems okay under @@ -751,7 +751,7 @@ my website) are the same under Fedora, CentOS and macOS.
-### Resources +### Resources
#### A note on Wehrmacht, its branches and other agencies and their Enigma machines @@ -874,7 +874,7 @@ that. ## Author's dedication:
-### Winning thoughts, dedications and thanks +### Winning thoughts, dedications and thanks
Once again I'm honoured to win along with some of the other veterans who I have diff --git a/2020/ferguson2/index.html b/2020/ferguson2/index.html index 723b2c0f3..eb123e660 100644 --- a/2020/ferguson2/index.html +++ b/2020/ferguson2/index.html @@ -521,7 +521,7 @@ from one of the greatest tragedies in the history of mankind.

-

IOCCC: an Enigma?

+

IOCCC: an Enigma?

Is there a better single word that could describe the code that is IOCCC? I’m sure there are some other words that are equally as valid but I believe ‘Enigma’ @@ -549,7 +549,7 @@ and the 2014 Morse audio transcoder by < Vik can be used to allow for the actual sound of it. With my entry we can complete the loop!

-

The 1992 Nathan Sidwell entry

+

The 1992 Nathan Sidwell entry

The author Nathan Sidwell of the 1992 Worst Abuse of the Rules had this to say about his program:

@@ -580,7 +580,7 @@ it was before his time in the IOCCC; but before the other judges could answer Ilya Kurdyukov sent a link to the original 1992 code. As of 4 March 2023 the original before unseen code was published but I leave this in for historical purposes.

-

Usage

+

Usage

If you run the program by itself it’ll use the default settings and prompt you for input (end with EOF). At that point it’ll process the input string and print the result (after finishing the enciphering).

@@ -599,7 +599,7 @@ The first one is reflector B and the second is reflector C.

pairs.

After that you can input the string and it’ll go from there.

-

Example run

+

Example run

BTW: There’s a much more entertaining (and delicious) challenge or exercise in recode.html (if you’re reading this on GitHub check the @@ -681,7 +681,7 @@ too. Notice also how it showed the same output that my program gave it - U

    $ echo IOCCC | ./prog | ./dorssel
     ..- ..- -- -- -..-
-

The recode.c configurator

+

The recode.c configurator

I have included a supplementary program recode.c that can do a number of things which acts as a kind of wrapper and configurator to my entry. By default @@ -709,7 +709,7 @@ make it more flexible by a wrapper program.

recode.html if reading on GitHub). See also the recode.1 and enigma.1 man pages.

-

A parser subtlety that could cause confusion

+

A parser subtlety that could cause confusion

The parser is in a sense rather rudimentary but allows for both interactive and automatic (e.g. via the recode program) input. This does mean that @@ -772,7 +772,7 @@ accomplished and made use of! :)

$ echo ABC | ./prog | ./prog ABC
-

On the source code layout

+

On the source code layout

The layout of recode.c isn’t too significant (but see below) but I want to mention prog.c especially:

@@ -796,7 +796,7 @@ ended his life. (I later made a bug fix but I consider this inconsequential).

…because it seems so wrong in C code at first glance. Also what does the ‘this’ refer to?

-

Obfuscation

+

Obfuscation

It’s an Enigma machine simulator! Isn’t that proof that it’s obfuscated itself?! :) Silliness aside obfuscation.txt has some of the ways I think this entry is obfuscated. To decipher try:

@@ -818,7 +818,7 @@ word OBFUSCATION:

    2OB5FU1SC2ATIONCDEFGHJKLMPQRYZ
      OB FU SC ATION
-

Bugs, limitations, differences from the real Enigma machines and general notes

+

Bugs, limitations, differences from the real Enigma machines and general notes

Ways that my simulator differs from the real thing. Not all of these are bugs and some could be considered features; others are just differences.

@@ -900,7 +900,7 @@ part.

online simulator so I presume it is correct. It might be that the Germans tended to have it at A but again I do not know.

-

Kriegsmarine support?

+

Kriegsmarine support?

Is it possible to add Kriegsmarine support? I thought so by adding the additional rotors but looking at it again it @@ -922,7 +922,7 @@ be found in the source code verbatim and you could confirm it by looking them up; however much more would have to be done in order to get them to work, than to just put the strings in. Again the way I set things up complicates this greatly.

-

Portability

+

Portability

I have tested it under macOS, Fedora and CentOS Linux and all seems okay under these platforms. When I was in the final stages of obfuscation I made an error somehow (or else maybe the vim formatting caused a problem - I have seen this @@ -938,7 +938,7 @@ input was put in correctly because as soon as a letter differs the entire sequence will be off.

The results of my test script (not included here but I will probably have it on my website) are the same under Fedora, CentOS and macOS.

-

Resources

+

Resources

A note on Wehrmacht, its branches and other agencies and their Enigma machines

The Wehrmacht was the defence force in full which included the Heer (army), @@ -1017,7 +1017,7 @@ don’t think there need be any addition to the recode program - at least not that.

Author’s dedication:

-

Winning thoughts, dedications and thanks

+

Winning thoughts, dedications and thanks

Once again I’m honoured to win along with some of the other veterans who I have a huge amount of respect for; there’s Don Yang, Dave