{"id":50,"date":"2004-01-18T13:55:45","date_gmt":"2004-01-18T18:55:45","guid":{"rendered":"https:\/\/thecapeblog.com\/wp\/?p=50"},"modified":"2004-01-18T13:55:45","modified_gmt":"2004-01-18T18:55:45","slug":"polymorphism-and-yu-gi-oh","status":"publish","type":"post","link":"https:\/\/thecapeblog.com\/?p=50","title":{"rendered":"Polymorphism and Yu-Gi-Oh"},"content":{"rendered":"<p>I spent a great day yesterday with my eldest grandchild, Bob, aka Robert\/Robby but never Bobby.<br \/>\nBob is 8 and in third grade and bored with school, especially math, which he says is a rehash of things he studied two years ago when his Mom home schooled him.<br \/>\nHe and his sister Emmeline may be &#8220;chips off the old\/very old&#8221; when it comes to Mathematics.  They both enjoy it and get good grades.  Emme by the way is the same child who was praised recently in her father&#8217;s <a href=\"http:\/\/www.tikkabik.com\" target=\"_blank\">blog<\/a> for her mastery of fractions:  &#8220;If you eat six eighths of a pizza, you&#8217;re a pig.&#8221;<\/p><p><!--more--><br \/>\nBob has been trying to teach me to play &#8220;cards&#8221; for ages, first Pokemon, and now <a href=\"http:\/\/www.yugiohetc.com\/\" target=\"_blank\">Yu-Gi-Oh!<\/a>.<br \/>\nThe cards contain pictures of anime characters, and there are several varieties: Monster, Magic and Trap cards.<br \/>\nYou win by wiping out your opponent in &#8220;battles&#8221;.  The outcome is based on a comparison of attack points and defense points on Monster cards.  These are not necessarily static.  The points can be changed by various techniques which take study and practice to master.<br \/>\nI&#8217;ve resisted getting into the cards, because the rules seemed convoluted, and besides, Bob changes them as we go along.  It&#8217;s nothing personal, his mother tells me he does the same to her.<br \/>\nWhat intrigued me yesterday, though, is that this game seems to be based on some of the principles of object-oriented programming.  I know, this sounds terribly precious and pretentious, but I think it&#8217;s good: it could instruct kids in the object-oriented way of thinking, which could help them figure out clever forms of digital embezzlement when they grow up.<br \/>\nAnyway: the principles of object-oriented programming are encapsulation (combining elements to create a new entity), polymorphism (the ability to process objects differently depending on their data type or class) and inheritance (a way to form new classes or objects using pre-defined objects or classes where new ones simply take over the old ones&#8217;s implementations and characteristics).  (definitions and examples below from <a href=\"http:\/\/www.webopedia.com\" target=\"_blank\">Webopedia<\/a> and <a href=\"http:\/\/en.wikipedia.org\" target=\"_blank\">Wikipedia<\/a>)<br \/>\nThese are all part of the play in Yu-Gi-Oh:<br \/>\n&#8220;Fusion&#8221; (encapsulation): using 2 or more monsters cards to create a new monster;<br \/>\n&#8220;Defense&#8221; or &#8220;Attack&#8221; modes (polymorphism): the same card can be used in different ways depending on its position (vertical or horizontal);<br \/>\n&#8220;Equip&#8221; and &#8220;Field&#8221; &#8220;Magic Cards&#8221; (inheritance): allow you to modify the strength of your Monster cards.<br \/>\nAfter watching my grandson whip my butt, which I think embarasses him because it&#8217;s so easy, I asked if he might be interested in learning how to program, a suggestion which of course, he liked.<br \/>\nAnyway, I think it would be cool if someone writes a Master&#8217;s thesis about this some day.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I spent a great day yesterday with my eldest grandchild, Bob, aka Robert\/Robby but never Bobby. Bob is 8 and in third grade and bored with school, especially math, which he says is a rehash of things he studied two &hellip; <a href=\"https:\/\/thecapeblog.com\/?p=50\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/thecapeblog.com\/index.php?rest_route=\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecapeblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecapeblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecapeblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecapeblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=50"}],"version-history":[{"count":0,"href":"https:\/\/thecapeblog.com\/index.php?rest_route=\/wp\/v2\/posts\/50\/revisions"}],"wp:attachment":[{"href":"https:\/\/thecapeblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecapeblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecapeblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}