{"id":15771,"date":"2019-11-03T17:00:25","date_gmt":"2019-11-03T22:00:25","guid":{"rendered":"http:\/\/scruss.com\/blog\/?p=15771"},"modified":"2022-10-09T08:51:45","modified_gmt":"2022-10-09T12:51:45","slug":"taxman-a-basic-game-from-1973","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2019\/11\/03\/taxman-a-basic-game-from-1973\/","title":{"rendered":"Taxman &#8211; a BASIC game from 1973"},"content":{"rendered":"\n<p>Back in 1973, the future definitely wasn&#8217;t equally distributed. While in Scotland we had power cuts, the looming three-day week and <em>Miners&#8217; Strike I<\/em>, in California, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/People%27s_Computer_Company\">People&#8217;s Computer Company<\/a> (PCC) was giving distributed computer access, teaching programming and publishing computer magazines. I don&#8217;t think we got that kind of access until (coincidentally) <em>Miners&#8217; Strike II<\/em> a little over 10 years later.<\/p>\n\n\n\n<figure class=\"wp-block-image alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/pcc-taxman.png\" alt=\"taxman drawn image from People's Computer Company magazine (1973) , with &quot;1 for you 19 for me&quot; quote from The Beatles song &quot;Taxman&quot;\" class=\"wp-image-15772\" width=\"357\" height=\"330\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/pcc-taxman.png 782w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/pcc-taxman-160x148.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/pcc-taxman-320x296.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/pcc-taxman-768x711.png 768w\" sizes=\"auto, (max-width: 357px) 100vw, 357px\" \/><figcaption>flares? platforms? centre parting? bow tie? It was 1973 after all<\/figcaption><\/figure>\n\n\n\n<p>But the <a href=\"https:\/\/www.computerhistory.org\/collections\/catalog\/102661095\">People&#8217;s Computer Company magazine archive<\/a> is a sunny thing, overfilled with joyful amateur enthusiasm and thousands of lines of code fit to make Edsger Dijkstra explode. Of course it was written for the local few who had access to mainframes and terminals, but it hardly seems to come from the same world as the dark evenings in Scotland spent cursing the smug neighbours&#8217; house with all the lights on, their diesel generator <em>putt-putt<\/em>ing into the night.<\/p>\n\n\n\n<p>Lots of these games from the PCC era are forgettable now. The raw challenge of guessing a number on a text screen has paled somewhat in the face of 4K photo-realistic rendering. One game I found is still a little challenging, at least until you work out the trick of it: <strong><a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman-pcc-v2-n1.pdf\">Taxman<\/a><\/strong> (or as the authors tried to rename it later, <a href=\"https:\/\/web.archive.org\/web\/20031207124002\/http:\/\/www.dragonfun.net\/factormonster.htm\">Factor Monster<\/a>). Here&#8217;s a tiny sample game transcript:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Hi, I'm the taxman\nDo you want the regulations?\n(1=Yes, 0=No)? 0\n\nHow many numbers do you want\nin the list? 6\n\nThe list is: 1  2  3  4  5  6 \n\nYou take? 5\nYour total is  5 \nI get  1 \nMy total is  1 \n\nNew list:  2  3  4  6 \n\nYou take? 6\nYour total is  11 \nI get  2  3 \nMy total is  6 \n\nNew list:  4 \nI get  4 \nbecause no factors of any number\nare left.\nMy total is  10 \n\nYou  11  Taxman  10 \nYou win !!!\n\nAgain (1=yes, 0=no)?<\/pre>\n\n\n\n<p>Seems I sneaked a lucky win there, but it&#8217;s harder than it looks. The rules are simple:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Start with a list of consecutive numbers<\/li><li>You choose a number, but it has to have some factors in the list<\/li><li>The taxman (or the <em>factor monster<\/em>, a concept I much prefer as it doesn&#8217;t reinforce the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Leona_Helmsley\">Helmsley Doctrine<\/a>) takes all the remaining factors of your number from the list<\/li><li>You get to choose a number from the list, which is now missing your previous choice and all of its factors, and repeat<\/li><li>Once the list has no multiples of any other number, the taxman\/FM takes the rest<\/li><li>The winner is whoever has the largest sum.<\/li><\/ul>\n\n\n\n<p>For such a simple game (or perhaps, such a simple me) the computer wins surprisingly often. Since I find it fun to play, I thought I&#8217;d share the 1973 love as much as possible by porting to all of the BASIC dialects that I knew.<\/p>\n\n\n\n<p><strong>Plain text BASIC<\/strong> &#8211; <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_bas.zip\">taxman.bas<\/a> &#8211; runs under interpreters such as bas. Almost verbatim from the 1973 publication. May not allow you to play again on some interpreters; you might want to try my slightly rearranged <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman-40col_bas.zip\">40 column version<\/a> that should run on systems that don&#8217;t allow a variable to be dimensioned twice.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"544\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_cpc.png\" alt=\"taxman on Amstrad CPC: starting with numbers 1-6, player has taken 4, so taxman takes 1 &amp; 2, leaving 3, 5 and 6\" class=\"wp-image-15776\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_cpc.png 768w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_cpc-160x113.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_cpc-320x227.png 320w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><figcaption>taxman on Amstrad CPC: how BASIC programs look to me, yellow on blue 4 lyfe<\/figcaption><\/figure>\n\n\n\n<p><strong>Amstrad CPC Locomotive BASIC<\/strong> &#8211; <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_AmstradCPC.zip\">taxman.dsk<\/a> &#8211; or as I call it, <strong><span style=\"text-decoration: underline;\">BASIC<\/span><\/strong>. 40 columns yellow on blue is how BASIC should look.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"502\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_BBC.png\" alt=\"taxman on BBC Micro, showing games tart for 1-6. Adjacent numbers are a full column apart\" class=\"wp-image-15778\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_BBC.png 640w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_BBC-160x126.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_BBC-320x251.png 320w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>taxman on BBC, Mode 7: dig the weird spacing<\/figcaption><\/figure>\n\n\n\n<p><strong>BBC BASIC<\/strong> &#8211; <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_BBC.zip\">taxman.ssd<\/a> &#8211; for all the boopBeep fans out there. You can actually <a rel=\"noreferrer noopener\" aria-label=\"play this one in your browser (opens in a new tab)\" href=\"https:\/\/bbc.godbolt.org\/?autorun&amp;loadBasic=https:\/\/gist.githubusercontent.com\/scruss\/89c1364e3bfd28aec223ad3419f44012\/raw\/bad019a76163ced7a267046f81bd1b2955ed1c22\/taxman.bas\" target=\"_blank\">play this one in your browser<\/a>, too. Yes, the number formatting is weird, but BBC BASIC was always its own master.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"384\" height=\"272\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_c64.png\" alt=\"taxman: Commodore 64 showing the instructions\" class=\"wp-image-15775\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_c64.png 384w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_c64-160x113.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_c64-320x227.png 320w\" sizes=\"auto, (max-width: 384px) 100vw, 384px\" \/><figcaption>taxman on C64<\/figcaption><\/figure>\n\n\n\n<p><strong>Commodore 64<\/strong> &#8211; <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_C64.zip\">taxman.prg<\/a> &#8211; very very upper case for this dinosaur of a BASIC.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"560\" height=\"384\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_a2.png\" alt=\"taxman running on Apple II: loaded from disk, started with 6 numbers\" class=\"wp-image-15777\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_a2.png 560w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_a2-160x110.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_a2-320x219.png 320w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><figcaption>taxman running on Apple II<\/figcaption><\/figure>\n\n\n\n<p><strong>Apple II AppleSoft BASIC<\/strong> &#8211; <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_AppleII.zip\">TAXMAN.DSK<\/a> &#8211; lots of fiddling with import tools and dialect weirdness because Apple.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_zx.png\" alt=\"taxman: end of game on ZX spectrum\" class=\"wp-image-15774\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_zx.png 640w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_zx-160x120.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_zx-320x240.png 320w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>taxman: end of game on ZX spectrum<\/figcaption><\/figure>\n\n\n\n<p><strong>ZX Spectrum (Sinclair BASIC)<\/strong> &#8211; <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_ZXSpectrum.zip\">taxman.tap<\/a> &#8211; 32 columns plus a very special dialect (no <strong>END<\/strong>, <strong>GOTO<\/strong> and <strong>GOSUB<\/strong> are <strong><em>GO TO<\/em><\/strong> and <strong><em>GO SUB<\/em><\/strong>) meant this took a while, but it was quite rewarding to get going.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"517\" src=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/Screenshot-from-2019-11-06-22-58-24.png\" alt=\"taxman - BASIC program listing on ZX-81 running under sz81 emulator, Linux window borders visible\" class=\"wp-image-15791\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/Screenshot-from-2019-11-06-22-58-24.png 640w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/Screenshot-from-2019-11-06-22-58-24-160x129.png 160w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/Screenshot-from-2019-11-06-22-58-24-320x259.png 320w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><figcaption>Taxman on ZX81: more SCROLLs than the Dead Sea<\/figcaption><\/figure>\n\n\n\n<p><strong>Sinclair ZX81<\/strong> (16 K) &#8211; <a href=\"http:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2019\/11\/taxman_ZX81.zip\">taxman.p<\/a> &#8211; this one was a fight. The ZX81 didn&#8217;t scroll automatically, so you have to invoke SCROLL before every newline-generating PRINT or else your program will stop. For some reason this version gets unbearably slow near the end of long games, but it does complete.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in 1973, the future definitely wasn&#8217;t equally distributed. While in Scotland we had power cuts, the looming three-day week and Miners&#8217; Strike I, in California, the People&#8217;s Computer Company (PCC) was giving distributed computer access, teaching programming and publishing computer magazines. I don&#8217;t think we got that kind of access until (coincidentally) Miners&#8217; Strike [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Taxman - a BASIC game from 1973 that's harder than it looks","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[3180,3181,641,1386,2062,2079,3183,3184,2099,3182],"class_list":["post-15771","post","type-post","status-publish","format-standard","hentry","category-goatee-stroking-musing-or-something","tag-3180","tag-acorn","tag-amstrad","tag-apple","tag-basic","tag-commodore","tag-factors","tag-pcc","tag-sinclair","tag-taxman"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-46n","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=15771"}],"version-history":[{"count":5,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15771\/revisions"}],"predecessor-version":[{"id":17103,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/15771\/revisions\/17103"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=15771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=15771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=15771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}