2024/ferguson1 bug fix, make goto complete (149)
A bug was discovered in prog.c (now prog.alt2.c, see below) that has been fixed. It was not a critical bug but it came about when juggling things during development, and fixing it means there should now only be one place where an event might not trigger (or actually it's an event within an event that does not trigger - polymorphism related). The prog.c is the goto complete version - what was once prog.goto.max.c (git status is confused however - it shows that that file is now prog.alt2.c but actually prog.alt2.c is what prog.c was). For practical reasons (and to make the judges not weep and curse me quite as much) this was not the prog.c but since some others have made corrections to their winning code I have decided to do the same thing here. It was a hassle to juggle between the different versions and I ran out of the number of files allowed - that is what I mean by practical reasons. The prog.c has maintained its thematic 4666 bytes, after some formatting updates. Typo fixes were made in some of the supplementary C files. Makefile updated so that one can compile prog.alt2.c. .entry.json, index.html and obfuscation.html were all updated. The judges' remarks were slightly corrected. It is not 134 (now 149) jumps that occurs but rather gotos. The jumps can be over 1000, in fact one test run was over 1400, although shorter games can be fewer (though still a lot). Other errors in documentation that were artefacts from earlier stages in development were also corrected, although I'm sure there are more (the ones that were discovered were ones near to stats that had to be updated).
This commit is contained in:
1 parent
a1c86c8a7a
commit
ad622a5354
15 files changed
+813
-636
No files matched your search
@@ -7,11 +7,16 @@
|
||||
* Please note that the order of events (the q = x(0,23)) might be in a
|
||||
* different order than the prog.c as some were added quite late and I just
|
||||
* pushed them in in prog.c without much thinking (which actually caused some
|
||||
* problems that had to be fixed). I am not sure if that actually happened and
|
||||
* there might even be some missing events but just as a note.
|
||||
* problems that had to be fixed). In prog.c the event numbers are 0,22 (a bug
|
||||
* in the submitted code was fixed - the switch was x(0,23) but there is no case
|
||||
* 23 there) but here you see it's 0,23 and the order is different. The son
|
||||
* mocking you if you eat his frozen body is not tied to an event in prog.c but
|
||||
* it is here.
|
||||
*
|
||||
* You might notice that the prog.alt.c has some additional events but those are
|
||||
* not here.
|
||||
* Actually this is closer to prog.alt.c in the sense that event 23 there also
|
||||
* has the son ghost mocking the PC. The difference is prog.alt.c has an event
|
||||
* 24 and that is not here. This almost certainly has fewer gotos in code (if we
|
||||
* count the comments probably not).
|
||||
*
|
||||
* Finally this code is from an earlier version so some of it might be missing,
|
||||
* not just the events, and not just the gotos, but potentially other things
|
||||
@@ -21,7 +26,8 @@
|
||||
*
|
||||
* WARNING: this code and its comments are not up to date. I wrote 116 before
|
||||
* filtered through the cpp and 134 after the cpp and I didn't wish to
|
||||
* repeatedly revisit this file trying to explain everything.
|
||||
* repeatedly revisit this file trying to explain everything. As it is I barely
|
||||
* finished this in time.
|
||||
*/
|
||||
#include<stdio.h>
|
||||
#include<string.h>
|
||||
|
||||
Reference in new issue
Block a user