Files
ioccc/2006/meyer/README.md
T
Landon Curt Noll 4f95e3f3d6 fix more broken markdown links
We fix more markdown links in markdown files that refer to files
internally to the web site.

Added tmp tools to find and print various markdown links:

* `tmp/md-links.sh` - print all markdown links
* `tmp/md-token-links.sh` - print all markdown links that start with a **%%TOKEN%%**
* `tmp/md-local-links.sh` - print all markdown links to a local file
* `tmp/md-link-paths.sh` - print local file paths referenced in markdown links

Fixed a number of markdown formatting problems with `thanks-for-help.md`.
Fixed markdown links to files in `thanks-for-help.md`.  Improved
heading levels in `thanks-for-help.md`, and made entry sections consistent.

Changed all markdown links that end in "))" to end in a better way.

Explained in `markdown.md` why we are avoiding markdown links that
end in "))".

Ran `make www` to perform the above.

TODO: Fix stuff we broke by mistake doing the above.

TODO: Fix more broken markdown links.
2024-04-26 04:17:20 -07:00

3.7 KiB

To build:

    make

To use:

    ./meyer [SEED]

Try:

    ./meyer [SEED]

For your first input try:

    a 0 1

where a is the row (a-i), 0 is the column (0-8) and 1 is the number (1-9).

NOTE: if you do not input three different 'words' it will block. You can input more text to fulfil the program's requirements.

NOTE: if your move is invalid it will prompt you again but not show the board.

Judges' remarks:

This entry turns a newspaper solitaire puzzle into a competition with the computer to be the last one moving. The object of this source code is to determine the object of this source code! :-)

Author's remarks:

I wanted submit a fully object-oriented entry to show that object-orientated code:

  1. is ridiculously bloated.
  2. is unreadable.
  3. isn't 'WYWIWID' ('what you write is what it does') anymore.

But I just totally failed. No, I didn't fail in showing any of the points above. Before I even had the chance to prove any of these claims, (1) already brought me to my knees. The code got so bloated up, that I missed the size limit by a few hundred bytes. Therefore, I broke the only rule in this contest, I think you shouldn't break in any case: Rule Nr 2, The size of ...

The degree of claim (2) actually depends on the compiler. As I manually translated it from a generic object-oriented programming language to C, it didn't just end up unreadable, but awfully messed up, i.e. obfuscated.

As it is already (pre)translated to C, you could also call it an object- disoriented program.

Comparing this program to a potential object-oriented implementation, it is obvious, that object-oriented code isn't 'WYWIWID' ('what you write is what it does'). It may be tempting to think that

    Object o;

might do something similar as

    struct not_an_object o;

But this program reveals that it doesn't. Even worse, this program only reveals the tip of the iceberg, what kind of black magic is involved in a simple declaration of an object.

A few things you can explore about object-orientation in this program include:

  • constructors (invoked by the new operator).
  • new operators (every class gets its own new operator at compile time).
  • virtual method tables (all the virtual method tables have been combined to a single vtable table).
  • runtime method binding.
  • inheritance and polymorphism.

It is left as an exercise to the reader to find a corresponding implementation in a popular object-oriented programming language.

Starting the game

    ./meyer [SEED]

Gameplay

It is a sudoku based game. The goal of the game is to be able to do the last valid 'move'.

On your turn you have to set a free cell to a value between 1 to 9 without breaking the following rule. Any number must be unique in its:

  1. row
  2. column
  3. 3x3 block.

Expected input for your move:

    row column number

where

    row:    [a-i]
    column: [0-8]
    number: [1-9].

The game can be aborted with q.

The one who can do the last move wins the game.