{"id":5566,"date":"2022-03-05T16:22:04","date_gmt":"2022-03-05T16:22:04","guid":{"rendered":"https:\/\/robertjwallace.com\/?p=5566"},"modified":"2022-03-05T18:14:08","modified_gmt":"2022-03-05T18:14:08","slug":"magic-with-your-phone-updated","status":"publish","type":"post","link":"https:\/\/robertjwallace.com\/es\/magic-with-your-phone-updated\/","title":{"rendered":"Magia con tu tel\u00e9fono \u2013 Actualizado"},"content":{"rendered":"<p>I added a couple of new features to the application.  First of all, I wanted to be able to launch the web page on my phone without having to type in the query strings to set the card backs, stack or mode of operation.  So I added an options feature.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The options feature allows you to choose the options and store them in a cookie on your phone or PC.  Note that this does not apply to using a spectators phone for the effect, unless you have access to the spectators phone ahead of time to set the options on it.<\/p>\n\n\n\n<p>To see the options launch the page with the query string ?options, i.e. <a href=\"https:\/\/robertjwallace\/mental\/?options\">https:\/\/robertjwallace\/mental\/?options<\/a> <\/p>\n\n\n\n<p>This will open the app with an options menu showing:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"581\" height=\"334\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2022\/03\/image.png\" alt=\"\" class=\"wp-image-5567 lazyload\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2022\/03\/image.png 581w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2022\/03\/image-300x172.png 300w\" data-sizes=\"(max-width: 581px) 100vw, 581px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 581px; --smush-placeholder-aspect-ratio: 581\/334;\"><figcaption>Options screen<\/figcaption><\/figure>\n\n\n\n<p>Choose the options and press the Save Options button.  The page will reload to the app without the ?options on the URL.  After that, as long as you have not cleared your cookies, each time you launch the app on your device it will open with those options defaulted.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Time based option<\/h2>\n\n\n\n<p>Time based is a new option.  It allows you to hand your phone to the spectator and let you make a prediction without ever seeing the cards.  It does this by setting the prediction based on the time the phone is showing.  It sets the prediction card by taking the suit based on the hours, and the card value based on the minutes.<\/p>\n\n\n\n<p>The suit is computed from the hours by taking the hours mod 4.  Mod 4 just means the  hours are divided by four and the remainder is the number used.  The remainder will be either 0, 1, 2, or 3.  0 is clubs, 1 is hearts, 2 is spades, and three is diamonds.<\/p>\n\n\n\n<p>The value is based on the minutes.  Value is the minutes rounded up to the nearest five minutes.  On a clock face each five minute mark corresponds to an hour hand position from one to twelve.  This means the value will be a number from 1 to 12,  or Ace to Queen.<\/p>\n\n\n\n<p>For example, if the time is 8:02,  the suit is clubs (8\/4 has 0 for a remainder), and the value is Ace (one minute rounded up to the nearest five minutes is 1 or Ace).  Hence the key cards is AD, and the prediction card is the next card in the stack. <\/p>\n\n\n\n<p>As soon at the minutes advance to 8:06, the value will change from 1 to 2, the key card becomes the 2D, and the prediction card is the next card in the stack. <\/p>\n\n\n\n<p>Note that if the time is on an even five minutes, i.e. 8:20, then the value is 2.<\/p>\n\n\n\n<p>Also note that if the web page is refreshed or reloaded within the same five minute period that the first card shown will be the same.  But if the page is not refreshed or reloaded, the time mode switches to mind reading mode, so you can continue to use the app to show how you can also read minds.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Usage<\/h2>\n\n\n\n<p>Case 1, using your own phone.  I just set the options I want ahead of time.  I have a home page icon to launch the application.  I show the spectator my phone, have them click on the icon and launch the app.<\/p>\n\n\n\n<p>Case 2, using the spectators phone.  I borrow a spectators phone and ask them to show me where their web browser is.  I enter the URL with the ?options query string, with the face of the phone hidden from their view.  I quickly set the options I want and press the set options key.  The screen reloads the application and I can hand them the phone so they can press the buttons.<\/p>\n\n\n\n<p>Case 3, using the spectators phone.  Assuming that you have not set the options on the spectators phone you can just launch the app letting it go to the defaults as long as you know the DAO stack.  You can buy an inexpensive e-book describing the DAO stack here: <a href=\"https:\/\/johnwell.selz.com\/item\/doug-dyment-1\">https:\/\/johnwell.selz.com\/item\/doug-dyment-1<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>I added a couple of new features to the application. First of all, I wanted to be able to launch the web page on my phone without having to type in the query strings to set the card backs, stack or mode of operation. So I added an options feature.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_eb_attr":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-5566","post","type-post","status-publish","format-standard","hentry","category-magic"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Bob","author_link":"https:\/\/robertjwallace.com\/es\/author\/admin\/"},"_links":{"self":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/5566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/comments?post=5566"}],"version-history":[{"count":3,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/5566\/revisions"}],"predecessor-version":[{"id":5572,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/5566\/revisions\/5572"}],"wp:attachment":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/media?parent=5566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/categories?post=5566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/tags?post=5566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}