There's only one DEF function HI(HashIndex). K$ contains the keys. Oh, dear. More string abuse. I must be the world's foremost string abuser or something. ^_^;
New and improved maze generator algorithm. I always thought my last maze was overly complicated. Now it's a whole lot simpler and it fits in one screen!
A command to determine array length would be nice. I've been keeping track manually, but something like LEN() for array would make it simpler.
Also, an #include directive to integrate source code as library would be convenient. Copying and pasting is actually inconvenient.
A hash is usually done via CHECKSUM function. So,
K=CHECKSUM("merringold")
R=HASH[K]
What I usually do, however, is just sort the array, and use binary search.
OTOH, assuming all the keys fit in a string, you can just use the value return by INSTR()
^_-
I much prefer that version than the short version. The short version is ugly, does not accept phrase, and terminates immediately.
In case you're curious, here's a screen cap of it.
My goal is to write short, but good code. Number of lines is never a consideration.
It seems a waste of public key when the program is only one screen. So, I hope it's alright to post the screen instead. It's Hangman/Guess the Word/Phrase.
One person type the secret phrase, others try to guess it.
Mnimalistic style. Music? SFX? What for?
Source code is provided. Feel free to modify!