Twenty-One Card Trick: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m Reverted edits by 98.248.33.198 (talk) to last version by Davidlars99
Undid revision 314878297 by Eeekster (talk) I agree with the IP editor. This adds nothing relevant to this article.
Line 20: Line 20:
== External links ==
== External links ==
* [http://www.card-magic.com/id1.html A Brief Analysis of the Twenty-One Card Trick and Related Effects by Justin Higham]
* [http://www.card-magic.com/id1.html A Brief Analysis of the Twenty-One Card Trick and Related Effects by Justin Higham]

== C#.NET Computer Program ==
Simple computer program that uses numbers instead of cards and guesses the right one.
<source lang="csharp">

using System;
namespace GuessTheNumber
{
class Program
{
private static int[] indexer = new int[21] {
0, 3, 6, 9, 12, 15, 18,
1, 4, 7, 10, 13, 16, 19,
2, 5, 8, 11, 14, 17, 20 };

static void Main(string[] args)
{
Start:
try
{
while (true)
{
Console.WriteLine("\nMemorize a digit and enter the row number in which it is located...\n");

int[] digits1 = new int[21] { 48, 22, 36, 37, 41, 45, 55, 59, 60, 66, 63, 72, 77, 84, 80, 99, 94, 90, 91, 93, 92 };
int[] digits2 = new int[21];
for (int i = 0; i < 3; i++)
{
Deal(digits1);

Console.Write("\nEnter row number: ");

int key = GetInput(Console.ReadLine());

switch (key)
{
case 1:
IndexToIndex(digits1, digits2, 0, 7, 7);
IndexToIndex(digits1, digits2, 7, 0, 7);
IndexToIndex(digits1, digits2, 14, 14, 7);
break;
case 2:
IndexToIndex(digits1, digits2, 7, 7, 7);
IndexToIndex(digits1, digits2, 0, 14, 7);
IndexToIndex(digits1, digits2, 14, 0, 7);
break;
case 3:
IndexToIndex(digits1, digits2, 14, 7, 7);
IndexToIndex(digits1, digits2, 0, 14, 7);
IndexToIndex(digits1, digits2, 7, 0, 7);
break;
}
digits1 = digits2;
digits2 = new int[21];
}

Console.WriteLine("\nYour number is: {0}\n", digits1[digits1.Length / 2]);

Console.Write("\nPress Enter to continue...");

Console.ReadLine();

Console.Clear();
}
}
catch (Exception ex)
{
Console.Write("\n{0} Press Enter to play again...", ex.Message);
Console.ReadLine();
Console.Clear();

goto Start;
}
}
private static void Deal(int[] digits)
{
Console.WriteLine();

int count = 0;

for (int i = 0; i < digits.Length; i += 7)
{
Console.Write("(ROW-{0}) \t", (count++)+1);

for (int j = i; j < (i + 7); j++)
{
Console.Write(digits[indexer[j]] + "\t");
}
Console.Write("\n");
}
}
private static void IndexToIndex(int[] sourceArray, int[] targetArray, int sourceIndex, int targetIndex, int count)
{
while (count > 0)
{
targetArray[targetIndex++] = sourceArray[indexer[sourceIndex++]];
count--;
}
}
private static int GetInput(string value)
{
int input;
if (int.TryParse(value, out input))
{
if (input < 1 || input > 3)
{
throw new Exception("Input must be between 1 and 3.");
}
}
else
{
throw new Exception("Input must be an integer.");
}
return input;
}
}
}
</source>


{{Magic and Illusion}}
{{Magic and Illusion}}

Revision as of 13:36, 19 September 2009

The Twenty One Card Trick is a magic effect in which the magician deals twenty one cards onto the table, into three piles of seven cards each, and asks the spectator to think of any of the cards shown. The spectator is not supposed to tell the magician which card is being thought of, but tells the magician which pile the card is in. This is done three times, and the magician is able to tell the spectator which card they were thinking of.

Variations

Minor aspects of the presentation are adjustable, for example the cards can be dealt either face-up or face-down. If they are dealt face-down then the spectator must look through each of the piles until finding which one contains the selected card, whereas if they are dealt face-up then an attentive spectator can immediately answer the question of which pile contains the selected card. Some performers deal the cards into face-up rows or columns instead of piles, which saves more time as all cards are partly visible.

When the same method is applied to three piles of nine cards each, it is called the 27 card trick. It is identical in principle.

Method

The cards are dealt into the piles one at a time, like when dealing out hands in a card game. Each time they are dealt out, after the spectator indicates which pile contains the thought of card, the magician places that pile between the other two. After the first time, the card will be one of the ones in position 8-14.

When the cards are dealt out the second time, the selection will be the third, fourth, or fifth card in the pile it ends up in. In picking up the piles, the magician places this pile between the other two again. This ensures that the selection will now be one of the ones in position 10-12.

The third time the cards are dealt out, the selection will be the fourth card in which ever pile it ends up in. On the third deal, as soon as the spectator indicates which pile contains the selection, the magician knows that it is the fourth, or middle, card in that pile. If the magician gathers up the piles again, as before with the pile containing the selection in the middle, the selection will be the eleventh card in the 21 card packet.

Literature

  • Professor Hoffmann, Modern Magic ISBN 0-486-23623-4

External links