Skip to main content
100%

number guessing (english)

✓ Published0🌍 Public
EEE2dev
Last edited Sep 27, 2016
Created on Sep 20, 2016

The example demonstrates the classic "magic number" card trick, where a user mentally selects a number between 1 and 60 and then answers yes or no as six shuffled cards are presented one by one. Each card contains a distinct subset of numbers, and the user’s cumulative yes/no responses are used to compute the hidden number. The visualization uses D3 v4 to render SVG cards and animated transitions, scaling each card to the foreground for interaction and shrinking it after each answer. The final solution is revealed with a slow text fade-in after the last card, using D3’s transition and style methods.

AI-generated description

Built with blockbuilder.org

Yesterday my 9-year old daughter showed me a "magic" trick from her school:

  • I had to think of a number between 1 and 60
  • She had six cards prepared with numbers written on them
  • She showed me one card after the other and I had to say if my number is on it or not
  • The order of the cards is irrelevant
  • Based on my answers she immediately knew the number I thought of

For the solution play through the example or see the code :)

mit Licensed

Similar vizzes