Code Golf: Connecting the dots

Commodore 64 BASIC – 313 chars

EDIT: See below for the golfed version

A little trip down the memory lane with PET graphics, POKEs and PEEKs and everything šŸ™‚

It fits in a single screen:)

The program operates directly in the screen memory, so you just go ahead, clear the screen, place your dots, and type RUN:

Input

You have to wait a minute or so while it finds the dots and then it starts to draw. It isn’t fast – you can actually see the lines being drawn, but that’s the coolest part šŸ™‚

Output

Golfed version:

Commodore BASIC seems like a great language for golfing, because it doesn’t require whitespace šŸ™‚ You can also shorten most of the commands by entering an unshifted first letter followed by a shifted second letter. For example, POKE can be typed as P[SHIFT+O], which appears as Pā”Œ on the screen:

Golfed version

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)