i wrote a simple number guessing game that works (using binary magic!) see attached aia. however i'm simply displaying the list of numbers as a simple list! i would like to populate a table of labels (by index) so i can simply loop over my list and set each corresponding labe's textl to the value of the list item - instead of coding 32 blocks.
did i define my table right? a verticalarrangement containing several horizontaarrangements? or should i have used a talbearrangement ( i didn't know how to use it)?
i can see the any component category but i do not see how to map the board (ie. table) to a list of numbers.
That's the other alternative i was contemplating - start with the binary notation for each number from 1 to 63, for each "card", select only those where the nth base-2 exponent is used in the representation of that number - ie. first get all numbers where 2^0 is used, then get all numbers where 2^1 is used, then 2^2, etc..
it's classic and it reflects the "magic" part of the trick!
thanks for the blocks. it's a pleasant alternative.
but i'm happy with what i got. someday, i'll rewrite it using this approach. next time i learn another block based language!
While we're on the subject, here's a photo of my magic number guessing deck I constructed when I was a kid. (Instructions were probably from scientific American). This prompted me to write this program in the first place. The magic of this deck was that it was self working! To use it, start with the cards in your hand in this order (1,2,4,8,16,32), if you find your number in the card, lay it on the table, face up, (over any earlier cards) with the side marked YES or NO on the top. After you're done, turn the deck over and voila- your number appears in a single tiny window, which resulted
from all the combinations of holes! It was amazing!