Windows Users Only! Download REALbasic source code for a simple card
trick program accessing the Windows file cards.dll. This program
"piggy-backs" on a cards.rbp program by Aaron Ballman. His program is
based on the card game "War," whereas my adaptation of his code is a
simple card trick described in a chapter in Martin Gardner's book Magic,
Mathematics, and Mystery.
It's a simple trick. Twenty-seven cards are dealt face-up into three
columns. The spectator is asked to secretly select a card and then to
indicate the column in which the card appears. The cards are picked up
and re-dealt into three columns. The spectator is asked in which column
his card appears now. The cards are dealt a third time with the same
question, and then the computer reveals the selected card. Not a very
spectacular trick, but the source code does show how one person's code
might be adapted for a rather different purpose. Perhaps it may inspire
you to write a much better program than mine. You may even learn
something from this sample program (even if it's how NOT to code). Who
knows? Try it out and see!
P.S. Here's where you can find the original project by Aaron Ballman:
http://www.aaronballman.com/programming/REALbasic/Cards.php
Here's basically where to go for my simple card trick program in RB:
http://traver.org/rb/cardtrick/
Here's the REALbasic source code for my simple card trick, if you want it:
http://traver.org/rb/cardtrick/cardtrick.rbp (77 KB)
Here's the card trick as a Windows executable program if you want to
avoid having to compile it:
http://traver.org/rb/cardtrick/cardtrick.exe (2,491 KB)
And here's the card trick as a Windows executable program in zip format:
http://traver.org/rb/cardtrick/cardtrick.zip (825 KB)
Enjoy!
Barry Traver
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|