A Simple Card Trick

Saturday, 5 November, 2022

⨳ 1 minute read ⨳ 163 words ⨳ SwiftUIappiOS

TLDR; I released my second iOS App.

Back in junior high school, my friend taught me a simple card trick:

  1. Deal out 21 cards in 3 rows of 7 cards each.
  2. Ask the person to remember their card and point to the row holding it.
  3. Collect rows.
  4. Repeat steps 1-3 two times.
  5. Flip over cards until just before you arrive at their card.
  6. Amaze them by having them flip over their own card.

Underneath this trick is simple sorting.

I thought it’d be a fun little challenge to make an app to replicate the majority of the trick.

It’s got options for performing the trick with 15, 21, 27, 35, 45, 55, & 65 cards; the same process is at play, so really, the physical size of the device defines the upper limit of what’s usable.

Because I’m slightly lazy, I copied the same three view organization from do-over – Main view, About view, & Settings view.


A Simple Card Trick - November 5, 2022 - Richard Koopmann