Skip to content

Latest commit

 

History

History

readme.md

C64 Code Golf

siehe Digital Talk 115 / C64 Buch

The fact that golf is an ancient game can be proven, among other things, by numerous prohibitions. In 1659, for example, it was forbidden to play the sport on the city centre streets in the American city of Albany. Perhaps this was also a reason why golf was soon only played on polished club lawns, which were, however, reserved for the elite. In Switzerland in the 1950s, mini-golf was finally patented and stylised as a petty-bourgeois alternative. It seems that every cultural community invents its own variations of golf. The home computer community, for whom golf is unsuitable (because fresh air is to be avoided), was given a veritable counterpart in 1986 with ‘Leaderboard Golf’, in which you could indulge in the green sport at three difficulty levels Novice, Amateur and Professional without ever having to leave your sofa at home.

Programmers, on the other hand, have given up the green altogether and now only play golf with lines of code. The winner of the round is the one with the shortest code in keystrokes: the fewest bytes to solve a given task. Entire communities have formed around ‘code golf’, resulting in extremely creative solutions. And that's exactly what this little call is all about! For the C64 Symposium, which took place in Bonn at the beginning of July (see http://rtro.de/c64), we came up with a series of BASIC code golfs that we would like to pass on to you. There is something for everyone! If the tasks are too easy for you, choose a higher level of difficulty or play with a handicap.

And for all those who are looking for a creative challenge or want to know what a golf ball diver is, we recommend the very last task ...

Scoring

English

  • Shortest code wins.
  • Code can be compressed (Shortcodes, Space = 1, Line Number = 2).
  • Code length can be measured directly: clr:?-fre(0)-26627
  • A long version can be created for explanation purposes.

Deutsch

  • Es gewinnt der cürzeste Kode.
  • Code darf weitmöglichst komprimiert werden (Shortcodes, Leerzeichen = 1, Zeilennummern = 2).
  • Die Codelänge kann direkt gemessen werden mit: clr:?-fre(0)-26627
  • Zu Erläuterungszwecken kann eine Langversion erstellt werden.

Hinweis zur Wiedergabe von PETSCII-Codes:

  • Im Langcode stehen PETSCII-Zeichen in {} mit der dazupassenden Tastenkombination oder Funktion.
  • Im Kurzcode steht an der Stelle der PETSCII-Zeichen ein Rautenzeichen # (für copy/paste).

Literature

Weßling, Holger: FOR BASIC TO ONE-LINERS, 2024.

Levels