[mw3.0 Englishprojectsize[744 426]turtles-have[]globals[]globals-list[globals-vars]ShapesProshapes[2 sphere](( !$7Kd:a #&),/25^>> ^>>|>^>>y>^^"^>z>^ ^":B^"> Y>>^2^ {7>> >> {X > > {X7 |yWzY{{zX6756X766 6{{ > 76>67WY{>>{>>[6 ||]@F !$'0?N]l{ />M\kz.=L[jy[8 sm-num-bg] !$'*-0369yyyyyyyyyyyyyyyyyyyy-[9 sm-num-0] '6ETcryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[10 sm-num-1] !*3<ENW`ir{~yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[11 sm-num-2] $3<ENW`ir{yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy [12 sm-num-3] $3<ENW`ixyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[13 sm-num-4] '4CRapyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy [14 sm-num-5] '0>MV_hwyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy [15 sm-num-6] $2:GVdryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy[16 sm-num-7] '09BKT]fox{~yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy#[17 sm-num-8] $2@OXguyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy'[18 sm-num-9]  $3BQ`o}yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyq[19 sm-num-10]R 3H\pyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy;[20 sm-num-11] *9HWfuyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyD[21 sm-num-12]% 0DR`o~yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy@[22 sm-num-13]! /AM[jxyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyK[23 sm-num-14], )8J^ryyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyN[24 sm-num-15]/ *9H\qyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"!shapeinfoAshape0name[arrow] shapeno0hash9D9CD32D34BE6020Cshape1name[diamond] shapeno1hash3A209E3CCC33FA344shape2name[sphere] shapeno2 hash||Bshape3name[square] shapeno3hashC0C76DABF1029109@shape4name[star] shapeno4hashDF409F9F9FDF3F7F@shape5name[lcsi] shapeno5hashC58CF98D3AB3F94F0shape6 name[||] shapeno6 hash||>shape7 name[||] shapeno7hashDF20207F80DF005F7shape8name[sm-num-bg] shapeno8 hash||6shape9name[sm-num-0] shapeno9 hash||8shape10name[sm-num-1]shapeno10 hash||8shape11name[sm-num-2]shapeno11 hash||8shape12name[sm-num-3]shapeno12 hash||8shape13name[sm-num-4]shapeno13 hash||8shape14name[sm-num-5]shapeno14 hash||8shape15name[sm-num-6]shapeno15 hash||8shape16name[sm-num-7]shapeno16 hash||8shape17name[sm-num-8]shapeno17 hash||8shape18name[sm-num-9]shapeno18 hash||9shape19name[sm-num-10]shapeno19 hash||9shape20name[sm-num-11]shapeno20 hash||9shape21name[sm-num-12]shapeno21 hash||9shape22name[sm-num-13]shapeno22 hash||9shape23name[sm-num-14]shapeno23 hash||9shape24name[sm-num-15]shapeno24 hash||Gshape25name[kangaroo2]shapeno25hashDBF28FBE00D40D47Gshape26name[kangaroo3]shapeno26hash7257ADAC5D23CAAACshape27name[lion1]shapeno27hashA877B1FFD9526610Cshape28name[lion2]shapeno28hash52D3B85E15761906@shape29 name[||]shapeno29hashDF20207F80DF005F@shape30 name[||]shapeno30hashDF20207F80DF005FBshape31name[bee1]shapeno31hash1B53CEBF7A01B02ABshape32name[bee2]shapeno32hashC00CCDB26F1416E7Hshape33name[butterfly1]shapeno33hash3FBD2DF11E2AC450Hshape34name[butterfly2]shapeno34hash41083AF35941AEAECshape35name[bird1]shapeno35hash6510C3F2FA569319Cshape36name[bird2]shapeno36hashE07411427667AEAE@shape37 name[||]shapeno37hashDF20207F80DF005F@shape38 name[||]shapeno38hashDF20207F80DF005FFshape39name[dolphin1]shapeno39hashBB5BC4CA91884CCAFshape40name[dolphin2]shapeno40hashE03C2E77CF89F622Fshape41name[dolphin3]shapeno41hash4FBC42AD63B25D5CBshape42name[fish]shapeno42hash3042E26896E189C1@shape43 name[||]shapeno43hashDF20207F80DF005F@shape44 name[||]shapeno44hashDF20207F80DF005FKshape45name[construction1]shapeno45hash797AF8DA6A169FDEKshape46name[construction2]shapeno46hash84C4ED816FC9302AKshape47name[construction3]shapeno47hash3F72A46E5AD5F2FFEshape48name[doctor1]shapeno48hash55120BE94A0052FFEshape49name[doctor2]shapeno49hash0CB72E01102E4BE6Eshape50name[doctor3]shapeno50hash872457C29F9518C3Dshape51name[judge1]shapeno51hash17380520BCB83D5BDshape52name[judge2]shapeno52hash360EED6F37E8FE9CFshape53name[student1]shapeno53hashC40D9F91FE733617Fshape54name[student2]shapeno54hashBE41457ACD45AA89Fshape55name[student3]shapeno55hash725E17746B49574EFshape56name[teacher1]shapeno56hash00D9195A7BA26952Fshape57name[teacher2]shapeno57hashACF0B9FEE8AF2DBEFshape58name[teacher3]shapeno58hash5D4BE516ADE1E1D1Eshape59name[kicker1]shapeno59hash0E8854AB360FDC1EEshape60name[kicker2]shapeno60hash4F4E8F7DDAD6DB36Eshape61name[runner1]shapeno61hash1DA04F18EBD2437CEshape62name[runner2]shapeno62hash53F7F853508D05F5Eshape63name[runner3]shapeno63hashC1F332D5E9E988BEEshape64name[runner4]shapeno64hash6854834099E47194Eshape65name[runner5]shapeno65hash33B1668D9DAC710EEshape66name[runner6]shapeno66hashC61508CE68D89403Bshape67name[ball]shapeno67hashC2017FBC47A49D1C@shape68 name[||]shapeno68hashDF20207F80DF005F@shape69 name[||]shapeno69hashDF20207F80DF005FDshape70name[bamboo]shapeno70hash15094945E4AAF02EDshape71name[baobab]shapeno71hash0C99A40676DF9F08Eshape72name[begonia]shapeno72hash969142BFFDB41A22Dshape73name[cactus]shapeno73hashFA3339D1637E6849Cshape74name[daisy]shapeno74hashF68197FF7FE562CACshape75name[fern1]shapeno75hashEEDC7A6C48D83E0DCshape76name[fern2]shapeno76hashD39FCFB53A041CCABshape77name[iris]shapeno77hashC3AE17949E06640CBshape78name[rose]shapeno78hash3CE370352BDCFB04Eshape79name[sapling]shapeno79hash7B2FD97981F45759Dshape80name[willow]shapeno80hash8E2EBD880F91DE12@shape81 name[||]shapeno81hashDF20207F80DF005F@shape82 name[||]shapeno82hashDF20207F80DF005FCshape83name[cloud]shapeno83hash1E237718D5B15548Hshape84name[lightning1]shapeno84hashD0C6E005DE4522EFHshape85name[lightning2]shapeno85hash64DC361614A043D3Hshape86name[lightning3]shapeno86hash1E4740F7B87CE02CGshape87name[raincloud]shapeno87hashE1A36208BF73CBD8Ashape88name[Sun]shapeno88hash5A438D8138AC3617@shape89 name[||]shapeno89hashDF20207F80DF005F@shape90 name[||]shapeno90hashDF20207F80DF005FCshape91name[Earth]shapeno91hashECD721930F087F55Eshape92name[Jupiter]shapeno92hashFDA0A5D7F6C2FD32Bshape93name[Mars]shapeno93hash730A21F1AC5F5567Eshape94name[Mercury]shapeno94hashF927702B937E1810Bshape95name[Moon]shapeno95hashCDD31EDEB0573767Eshape96name[Neptune]shapeno96hash99C9B41B2B60D9FCCshape97name[Pluto]shapeno97hash9EBCBAE524B66D9EDshape98name[Saturn]shapeno98hashD4C1C7631FAE38E3Dshape99name[Uranus]shapeno99hashA99C40F139931AD7Eshape100name[Venus]shapeno100hash942D6DB6644B5890Fshape101name[rocket]shapeno101hash767C5ABF20623BE8Ishape102name[satellite]shapeno102hashE3EEE401233195CBBshape103 name[||]shapeno103hashDF20207F80DF005FBshape104 name[||]shapeno104hashDF20207F80DF005FKshape105name[eiffeltower]shapeno105hashDAE78C2459165378Gshape106name[liberty]shapeno106hashD02D16E85E4CB664Gshape107name[obelisk]shapeno107hash03814BD94FCBF8BBGshape108name[pyramid]shapeno108hash9DEAD10D786143E9Eshape109name[house]shapeno109hash4DA66216215A9B86Ishape110name[apartment]shapeno110hash3261E00C4FF33033Eshape111name[cabin]shapeno111hash48E6A8ECCF068EEFBshape112 name[||]shapeno112hashDF20207F80DF005FBshape113 name[||]shapeno113hashDF20207F80DF005FHshape114name[balloons]shapeno114hashE6DE2E65F4395218Dshape115name[cake]shapeno115hash0A2B343CEA7073C1Gshape116name[diploma]shapeno116hashC69CBA0E8DFA22C5Hshape117name[partyhat]shapeno117hash474598AD52EB9581Bshape118 name[||]shapeno118hashDF20207F80DF005FBshape119 name[||]shapeno119hashDF20207F80DF005FBshape120 name[||]shapeno120hashDF20207F80DF005FBshape121 name[||]shapeno121hashDF20207F80DF005FBshape122 name[||]shapeno122hashDF20207F80DF005FBshape123 name[||]shapeno123hashDF20207F80DF005FBshape124 name[||]shapeno124hashDF20207F80DF005FBshape125 name[||]shapeno125hashDF20207F80DF005FBshape126 name[||]shapeno126hashDF20207F80DF005FBshape127 name[||]shapeno127hashDF20207F80DF005Fbrusheswbrushno0 maskno0 size1 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]wbrushno1 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]wbrushno2 maskno0 size8 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrushno3 maskno0 size15 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]wbrushno4 maskno1 size8 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrushno5 maskno1 size15 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrushno6 maskno0 size15 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade17wbrushno7 maskno1 size15 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade5wbrushno8 maskno5 size15 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade7xbrushno9 maskno3 size15 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade19ybrush no10 maskno0 size2 edge4 fcn0fcnnamemake-airbrush special0 fade67 shade[]ybrush no11 maskno0 size4 edge8 fcn0fcnnamemake-airbrush special0 fade67 shade[]zbrush no12 maskno0 size5 edge10 fcn0fcnnamemake-airbrush special0 fade67 shade[]ybrush no13 maskno1 size3 edge7 fcn0fcnnamemake-airbrush special0 fade70 shade[]zbrush no14 maskno1 size5 edge10 fcn0fcnnamemake-airbrush special0 fade67 shade[]ybrush no15 maskno0 size8 edge0 fcn1fcnnamemake-edgebrush special0 fade0 shade[]zbrush no16 maskno0 size15 edge0 fcn1fcnnamemake-edgebrush special0 fade0 shade[]ybrush no17 maskno1 size6 edge0 fcn1fcnnamemake-edgebrush special0 fade0 shade[]zbrush no18 maskno1 size12 edge0 fcn1fcnnamemake-edgebrush special0 fade0 shade[]xbrush no19 maskno0 size3 edge0 fcn2fcnnamemake-rainbowspecial[] fade0 shade[]xbrush no20 maskno0 size8 edge0 fcn2fcnnamemake-rainbowspecial[] fade0 shade[]ybrush no21 maskno0 size15 edge0 fcn2fcnnamemake-rainbowspecial[] fade0 shade[]xbrush no22 maskno1 size8 edge0 fcn2fcnnamemake-rainbowspecial[] fade0 shade[]ybrush no23 maskno1 size15 edge0 fcn2fcnnamemake-rainbowspecial[] fade0 shade[]ybrush no24 maskno2 size12 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]ybrush no25 maskno3 size12 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]ybrush no26 maskno4 size12 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]ybrush no27 maskno5 size12 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no28 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no29 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no30 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no31 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no32 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no33 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no34 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xbrush no35 maskno0 size3 edge0 fcn0fcnnamemake-airbrush special0 fade0 shade[]xproceduresitext{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Courier New;}{\f1\fnil Courier New;}{\f2\fmodern Courier New;}{\f3\fmodern\fcharset0 Courier New;}{\f4\fnil Arial;}} {\colortbl ;\red0\green0\blue0;\red255\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red128\green0\blue255;} \viewkind4\uc1\pard\cf1\f0\fs20 ;red-peg-game-A \par \par \f1 ;;;;;;;;; FUTURE ENHANCEMENTS ;;;;;;;;;;;;;;; \par ; \par ;1. clean-up globals & proc loops \par ;2. change stack from FILO to FIFO \par ;3. change stk4 from true \f0 "\f1 holes\f0 "\f1 to true \f0 "\f1 pegs\f0 "\f1 and \par ;4. include red peg info in stk4 (add 100 to peg\f0 id\f1 if it is red). \par ;5. use the same \f0 list \f1 format for brain, pp, dd. \par ;6. allow concurrent play and analysis (avoid stopall in err msg) \par ;\f0 7. pre-check for some zero solution endings \par ;8. save all ending possibilities in a global \par ;9. flash analyze light during long computations \par ;10. during analysis ...take advantage of mirror symmetry to reduce computation time. \par ; \par ;Why is the text-box "sequences" limited to approx. 10580 entries? \par ;If I had more memory would this be higher? \f1 \par ; \par \f0 ;why does the bottom of the announcement \par ;window cut off the Stop & OK buttons?? \par ;THIS IS A BUG IN MicroWorlds Ver 1.1 running in MSWIN XP \par ; \par \f1 ;try a drag-and-drop technique instead of \par \f0 ;using \f1 clicks \par ; \par ;try to minimize or elim use of globals? \par ; \par ;is there a procedure command that can be \par ;used to EXIT the game?\f0 I THINK THE ANS IS NO?\f1 \par \f0 ; \par ;look into the use of \par ;"turtlesown" to control visibility? \par ; \par ;NOTE: if turtle is truely invisible, \par \f1 ;set "t3 "visible? "false \par ;get "t3 "visible? \par \f0 ;then turtle can't be clicked? \par ; \par ;;;;;;;;; END ;;;;;;;;;;;;;;; \par \par \par \f1 to startup \par \f0 ;cc \par \f1 presentationmode \par reset \par \f2 tto "counter ct ; clear counter display \par tto "sequences ct ; clear sequence display \par print se "starting-holes= \f3 1\cf2\f2 \par \cf1 print se "red-turtle-position= \f3 12\f2 \par print se "requested-ending-position= \f3 0\f2 \par ;\cf2 \par \cf1\f1 end \par \f0 \par \par \f1 to clicked \par \f0 ;move turtle or flip turtle \par ;\f1 \par if\f0 else\f1 :flip-sw = "on \par [\f0 ;flip turtle visibility \par \f1 flip-it\f0 ] \par [ifelse :red-sw = "on \par [\f1 ;flip turtle or hole to red \par \f0 red-it]\f1 \par \f0 [\f1 ifelse :1st-clk-sw \par \f0 \f1 [do.1st.clk] \par \f0 \f1 [do.2nd.clk] \par \f0 ] \par ]\f1 \par end \par \par \par to \f0 red \par \f1 ;toggle :red-sw and it's indicator \par ;light to ON/OFF status \par \f0 ;\f1 \par ifelse (:red-sw = "on) \par [make "red-sw "off \par \cf2\f0 ;\f1 set "t1\f0 7\f1 "visible? "false \par \f0 t17, ht\f1 ] \par \cf1 [make "red-sw "on \par \cf2\f0 ;\f1 set "t1\f0 7\f1 "visible? "true \par \f0 t17, st\f1 ] \par \cf1\f0 ;toggle :flip-sw and it's indicator \par ;light to OFF status \par \f1 make "flip-sw "off \par \cf2\f0 t16, ht\f1 \par \f0 ;\f1 set "t16 "visible? "false \par \cf1 end \par \par \par to flip \par ;toggle :flip-sw and it's indicator \par ;light to ON/OFF status \par ifelse (:flip-sw = "on) \par [make "flip-sw "off \par \cf2\f0 \f1 ;set "t16 "visible? "false\cf1 \par \f0 \cf2 t16, ht]\f1 \par \par \cf1 [make "flip-sw "on \par \cf2\f0 ;\f1 set "t16 "visible? "true \par \f0 t16, st\f1 ] \par \cf1 ;toggle :red-sw and it's indicator \par ;light to OFF status \par make "red-sw "off \par \cf2\f0 ;\f1 set "t17 "visible? "false \par \f0 t17, ht\f1 \par \cf1 end \par \par \par to reset \par \f0 ;reset for game-play (analysis has it's own reset)\f1 \par everyone [setc "black] ;make ALL turtles black \par t12, setc "red ;make t12 red \par t1, setc "green ;make t1 a hole \par make "red-sw "\f0 OFF\f1 \par make "old-red "t12 ;(used by red-it procedure) \par \f0 make "flip-sw "OFF\f1 \par make "1st-clk-sw "true ;(used by 1st click procedure) \par make-pp ; make brain for game \par \f0 ; \par \cf2\f1 ;CAUTION...\cf1 t16-t18 are the indicator lights \par ;they must not be black, they are made yellow \par ;to avoid being processed by the IDENTIFY Proc \par ;It's the shape of t16-t18 that is important. \par \cf2 t16, setc "yellow ;any color but black/red \par t17, setc "yellow ;any color but black/red \par t18, setc "yellow ;any color but black/red \par \f0 ; \par t16, ht \par t17, ht\f1 \par \cf1\f0 ;\f1 set "t16 "visible? "false ;set flip indicator OFF \par \f0 ;\f1 set "t17 "visible? "false ;set red indicator OFF \par \f0 ;\f1 \par \f0 ;;analysis's sw & indicators are (controled by analysis) \par ;;\f1 set "t18\cf2 \cf1 "visible? "false ;set analysis indicator OFF \par ;;make "analysis-sw "OFF \f0 ;set analysis sw to OFF\f1 \par \cf2 ;FIX ??? what about \par \cf1 ;st-holes \par ;red.position \par ;red.position.hold \par ; \par end \par \par \par to analyze \par \f0 ; \par \f1 ;get info from "peg board" \par make "st-holes get-holes \par make "red.position get-red \par \f0 make "red.position.hold :red.position\f1 \par \f0 ;\f1 \par ;do analysis set-up and get info from \f0 "\f1 player\f0 "\f1 \par init-analysis\f0 \f1 \par \f0 ; \par \cf2 ;NICE ... if tree was pre-checked for zero solution \par ;situations to avoid (sometime long) analysis. \par \cf1 ;\f1 \par \f2 ;analyze tree & display results\f1 \par \f2 rcv.tree :st-holes \par \f3 ; \par \cf2 ;FIX ... no need to report last red position \par \cf1 ;if moves were found then \par \f2 ;report red.position for the \par ;LAST reported move sequence. \par \f3 if NOT :peg-cnt-1 = 0 \f2 \par \f3 [\f2 tto "sequences \par \f3 \f2 if NOT :red.position.hold = 0 \par \f3 \f2 [print se "red-turtle-ending-position= :red.position.hold] \par \f3 ]\f2 \par \f0 ;\f1 \par ;turn analysis light OFF \par \cf2\f0 ;\f1 set "t18 "visible? "\f0 false\f1 ;set analysis indicator \f0 OFF \par t18, ht\f1 \par \cf1 make "analysis-sw "\f0 OFF\f1 \cf2\f0 \cf1\f1 \par end \par \par \par \par to demo \par ;\f0 run demo\f1 \par announce \par [If you saw the sequence of moves needed to be a peg/turtle Genius, it might spoil the challenge of this game. There are numerous solutions! DO YOU WANT TO PROCEED?. \par ] \par show-dd ;run demo \par end \par \par \par \f0 to abort \par ;abort provides STOPALL for presentation mode. \par ; \par \f1 ;turn analysis light OFF \par \cf2\f0 ;\f1 set "t18 "visible? "false ;set analysis indicator OFF \par \f0 t18, ht\f1 \par \cf1 make "analysis-sw "OFF \cf2\f0 \f1 \par \cf1\f0 STOPALL ; ... stops analysis \par end \par \par \par \f1 to quit \par \f0 ;count the number of black or red turtles left\f1 \par make "cnt 0 \par everyone \par [if OR (color = 9) (color = 15) \par [make "cnt :cnt + 1 ]] \par announce (sentence "There "are :cnt "\f0 turtle\f1 s "left.) \par announce [leave one, you're genius. \par leave two and you're purty smart. \par leave three and you're just plain dumb. \par leave four-or-more 'en you're \par just an 'eg-no-rah-moose. \par ] \par end \par \par \par to flip-it \par ;flip turtle's visibility \par ;9 = visible \par ;55 = invisible \par \f0 ; if turtle is red, \f1 clear old-red history \par \f0 if color = 15 \par [make "old-red 0] \par ;flip red to blk, \par ;flip blk to invisible\f1 \par ifelse color = 9 \par [setc 55] \par [setc 9] \par end \par \par \par to red-it \par make "new-red who \par \f0 ;\f1 \par \f0 ;turn OFF previous red (if present)\f1 \par if NOT :old-red = 0 \par [tto :old-red \par setc "green] \par \f0 ;\f1 \par \f0 ;turn ON new red\f1 \par tto :new-red \par setc "red \par make "old-red :new-red \par \f0 ;\f1 \par \f0 ;turn red sw & light to OFF\f1 \par make "red-sw "off \par \cf2\f0 t17, ht\f1 \par \f0 ;\f1 set "t17 "visible? "false \par \cf1 end \par \par \par \f0 to do.1st.clk \par ;global input ... \par ;who = clicked turtle's id \par ; \par \f1 ;global outputs ...\f0 (for nested procs)\f1 \par ;pp-x\f0 = possible moves for clicked turtle\f1 \par ;1st-clk-sw\f0 = switch status\f1 \par ;1st-clk-tur\f0 = turtle's id\f1 \par ;hold-t-color\f0 = turtle's color\f1 \par \f0 ;\f1 \f0 \par make "1st-clk-tur who \par ; \par ;quit if :1st-clk-tur color is INVISIBLE \par if (invisible-tur? :1st-clk-tur) \par [msg-no-turtle] \par \par ;flash the 1st-clk-tur \par flash-1st \par ; \par ;get set of valid 1st moves from game-brain \par \f1 make "\f0 pp-x\f1 item (butfirst who) :pp \par \f0 ;\f1 \par ;quit if jump is not possible \par \f0 if NOT valid-1st? \par [msg-not-valid-1st] \par ; \par \cf2 ;NICE... test if there are ANY valid pegs \par ;if YES continue \par ;if NO, announce no moves left. \par \cf1 make "1st-clk-sw "false \par ; \par end \par \par \par \f1 to do.\f0 2nd\f1 .clk \par make "\f0 2nd\f1 -clk-tur who \par \f0 ;\f1 \par \f0 ;quit if :2nd-clk-tur color is VISIBLE \par if (visible-tur? :2nd-clk-tur) \par \f1 [msg-2nd-turtle-black]; err & stopall \par \f0 ;\f1 \par \f0 ;quit if 2nd-clk-tur is an invalid position \par if NOT valid-2nd? \par \f1 [msg-not-valid-2nd] \par \f0 if (t-color :pp-1) = "red \par \f1 [msg-cant-jump-red] \par \f0 ; \par ;move the turtle to it's valid position \par ;and erase old position\f1 \par \f0 tto :2nd-clk-tur \par setc :hold-t-color ; make visible \par tto :1st-clk-tur \par setc "green ;make invisible \par ; \par ;make the jumped turtle (pp-1) \par ;blue before making it invisible \par tto :pp-1 setc "blue \par wait 10 \par tto :pp-1 setc "green ;make invisible\f1 \par make "1st-clk-sw "\f0 true \par ; \par \cf2 ;NICE ... congratulate if 1 turtle left! \par ; \par ;NICE ... announce if no moves left \par ; \par \cf1\f1 ;global output ...\f0 \f1 1st-clk-sw \par end \par \par \par to valid-1st? \par ;\f0 global \f1 input ... \par \f0 ;\f1 pp-x = \f0 sets of \f1 valid\f0 \f1 moves\f0 for \par ;the 1st clicked position.\f1 \par \f0 ;\f1 \par ;test if \f0 "a" \f1 valid move is possible \par ;(place to goto must be INVISIBLE) and \par ;(place that is jumped must be VISIBLE\f0 and \par ; NOT red\f1 ) \par \f0 ;assume the [FROM] 1st clicked turtle \par ;has been verified to be VISIBLE.\f1 \par ;if YES return "true \f0 \f1 \par ;if NO return "false \par ; \par dolist [i [1 2 3 4]] \par [ \par ;get ith-set-of-the-valid-set\f0 -of-moves\f1 \par make "pp-xi item :i :pp-x \par if (empty? :pp-xi) \par [op "false ] \par ; \par make "pp-1 first :pp-xi\f0 ;[OVER] turtle\f1 \par make "pp-2 last :pp-xi\f0 ;[ TO ] turtle\f1 \par ; \par if AND (visible-tur? :pp-1) (invisible-tur? :pp-2) \par [\f0 if NOT (t-color :pp-1) = "red [\f1 op "true] \par \f0 ]\f1 \par ] ;end-of-dolist \par \par ;if all 4 tests fail then output false \par op "false \par end \par \par \par \par to valid-2nd? \par ;\f0 global \f1 input\f0 (s)\f1 ... \par \f0 ; :pp-x = set of \f1 valid\f0 \f1 moves\f0 for \par ; the 1st clicked position.\f1 \par ;\f0 \f1 :2nd-clk-tur\f0 position \par ;\f1 \par ;test if 2nd click was \f0 a \f1 valid place to go to\f0 .\f1 \par \f0 ;(2nd clk must match the [TO] in the sets of \par ; valid moves) and \par ;(the [OVER] turtle must be VISIBLE, it may \par ; be RED or BLACK). \par ; test was done by "valid-1st?" procedure.\f1 \par ;if YES return "true \f0 AND\f1 pp-1 eq to \f0 the [OVER] \f1 peg\f0 .\f1 \par ;if NO return "false\f0 .\f1 \par \f0 ; \f1 \par dolist [i [1 2 3 4]] \par [ \par ;get ith-set-of-the-valid-sets \par make "pp-xi item :i :pp-x \par ; \par if (empty? :pp-xi) \par [op "false] \par ; \par make "pp-1 first :pp-xi\f0 ;[OVER] position\f1 \par make "pp-2 last :pp-xi\f0 ;[ TO ] position \par \cf2 ;;make "over-position :pp-1 \par ;;make "to-position :pp-2\cf1\f1 \par \f0 ;\f1 \par if AND (:pp-2 = :2nd-clk-tur)(visible-tur? :pp-1) \par \f0 [op "true]\f1 \par \f0 ;\f1 [if NOT (t-color :pp-1) = "red [op "true] \par \f0 ;\f1 ] \par ] ;end of dolist \par \f0 ;\f1 \par ;if all 4 tests fail\f0 ed\f1 then output false \par op "false \par end \par \f0 \par \par to identify \par ; this procedure is not being used. \par ;show all holes that turtles can jump to \par ; \par \f1 ;CAUTION turtle\f0 s\f1 t16\f0 -t18 (\f1 the \f0 turtle colors) are\f1 \par ;colored \f0 yellow\f1 so \f0 as\f1 not \f0 tobe \f1 processed by \par ;the everyone command\f0 .\f1 \par \f0 ; \par \f1 ;cc \par ;make-pp ... done by reset \par make "1st-clk-sw "true\f0 ;reset 1st click status\f1 \par make "found-place-sw "false \par \f0 ; \par ;examine ALL turtles for red or black visibility \par everyone \par [if OR (color = 9) (color = 15) \par [test-valid-moves] \par ] ;end-everyone \par ; \par if (:found-place-sw = "false) \par [announce [NO VALID MOVES LEFT!]] \par end \par \par \par to test-valid-moves \par ;for current turtle \par \f1 ;test if valid move\f0 s\f1 \f0 are\f1 possible \par ;(place to goto must be INVISIBLE) and \par ;(place that is jumped must be VISIBLE\f0 and NOT red\f1 ) \par \f0 ;(report ALL valid places to goto) \par ;(set found-place-sw to true) \par ; \par ;get sets of valid moves for current turtle \par \f1 make "\f0 pp-x\f1 item (butfirst who) :pp \par \f0 ;\f1 \par \f0 dolist [i [1 2 3 4]]\f1 \par \f0 [ \f1 \par ;get first-set-of-the-valid-sets \par make "pp-x\f0 i\f1 item \f0 :i\f1 :pp-x \par if (empty? :pp-x\f0 i\f1 ) \par [stop ] \par make "pp-1 first :pp-x\f0 i\f1 \par make "pp-2 last :pp-x\f0 i\f1 \par ; \par if AND (\f0 (t-color :pp-1) = "black\f1 ) (invisible-tur? :pp-2) \par [\f0 make "found-place-sw "true \par flash-the-hole ]\f1 \par \f0 ] \par end \par \par \par to \f1 flash\f0 -the-hole\f1 \par repeat 3 [setc "\f0 yellow\f1 wait 1 setc "white wait 1] \par setc "\f0 green \par end\f1 \par \f0 \par \par to visible-tur? :tur-name \par ;red or black is visible \par \f1 if\f0 else\f1 (t-color :\f0 tur-name\f1 ) = "\f0 green \par [op "false] \par [op "true] \par end\f1 \par \f0 \par \par \f1 to \f0 in\f1 visible-tur? :tur-name \par if\f0 else\f1 (t-color :tur-name) = "\f0 green\f1 \par [op "true] \par [op "false] \par \f0 end \par \par \par \f1 to t-color :t-name \par ;report turtle's color \par ;as "black or "green\f0 or "red\f1 \par tto :t-name \par if color = 9 [output "black] \par \f0 if color = 55\f1 [output "green] \par \f0 if color = 15 [output "red] \par ;the following should never occur \par announce [COLOR ERROR ... abort.] \par abort\f1 \par end \par \f0 \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par ;the following err messages disrupt \par ;concurrent play & analysis \par \par to msg-cant-jump-red \par make "1st-clk-sw "true \par announce [CAN'T JUMP RED TURTLE ... try again.] \par abort \par end \par \par \f1 to msg-2nd-turtle-black \par make "1st-clk-sw "true \par announce [TURTLE PRESENT ... try again.] \par abort \par end \par \par to msg-not-valid-1st \par make "1st-clk-sw "true \par announce [NO PLACE TO GO ...] \par abort \par end \par \par to msg-not-valid-2nd \par make "1st-clk-sw "true \par announce [NOT A VALID PLACE TO GO TO ...] \par abort \par end \par \par to msg-no-turtle \par make "1st-clk-sw "true \par announce [NO TURTLE] \par abort \par end \par \f0 \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \cf2 ;FIX ... no need for different formated \par ;brains for game-play and analysis \par \par \cf1 to make-pp \par ;make brain for game-play \par ;pp = list of valid moves for holes 1-15 \par \f2 ;...(meaning: move 3 over 2 to 1) \par \f0 \par \f1 make "pp (list \par [[t2 t3][t6 t1\f0 0\f1 ]\f0 [][]\f1 ] \par [[t3 t4][t7 t\f0 11\f1 ]\f0 [][]\f1 ] \par \f0 [[t4 t5][t8 t12][t7 t10][t2 t1]] \par [[t3 t2][t8 t11][][]] \par [[t4 t3][t9 t12][][]] \par [[t7 t8][t10 t13][][]] \par [[t8 t9][t11 t14][][]] \par [[t7 t6][t11 t13][][]] \par [[t8 t7][t12 t14][][]] \par [[t11 t12][t13 t15][t6 t1][t7 t3]] \par [[t7 t2][t8 t4][][]] \par [[t8 t3][t11 t10][t9 t5][t14 t15]] \par [[t11 t8][t10 t6][][]] \par [[t12 t9][t11 t7][][]] \par [[t13 t10][t14 t12][][]]\f1 ) \par \f0 end \par \par \par \f1 to make-dd \par \f0 ;make list of moves for demo\f1 \par make "dd (list \par [t10 t6 t1] [t3 t7 t10] [t13 t10 t6] \par [t5 t4 t3] [t1 t6 t10] [t2 t3 t4] \par [t12 t8 t3] [t3 t4 t5] [t15 t14 t12] \par [t9 t12 t14] [t10 t11 t12] [t14 t12 t9] \par [t5 t9 t12] \par ) \par end \par \f0 \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par to show-dd \par ;do auto demo \cf2 \par \cf1 reset \par wait 10 \par make-dd ;setup list of moves for demo \par dolist [i [1 2 3 4 5 6 7 8 9 10 11 12 13]] \par [ \par make "dd-x item :i :dd \par make "dd-x1 item 1 :dd-x \par \f1 make "dd-x\f0 2\f1 item \f0 2\f1 :dd-x \par make "dd-x\f0 3\f1 item \f0 3\f1 :dd-x \par \f0 tto :dd-x1\f1 \par \f0 make "color-x color\f1 \par ;\f0 F\f1 lash the 1st-clk-tur \par tto :dd-x1 \par repeat \f0 6\f1 [setc \f0 :color-x\f1 wait 1 setc "white wait 1] \par \f0 setc :color-x \par wait 5\f1 \par ;FLASH the jumped turtle \par ;before making it invisible \par tto :dd-x2 \par repeat \f0 3\f1 [setc \f0 "blue\f1 wait 1 setc "white wait 1] \par setc "\f0 black\f1 \par wait \f0 5\f1 \par setc "green ;make invisible \par ;\f0 M\f1 ove 1st-clk-tur to hole \par tto :dd-x3 \par setc \f0 :color-x\f1 \par \f0 wait 10 \par tto :dd-x1 setc "green\f1 \par \f0 ]\f1 \par \f0 end \par \par \par to flash-1st \par ;\f1 flash the 1st-clk-tur \par \f0 make "hold-t-color t-color who \par \f1 repeat 3 [setc "\f0 blue\f1 wait 1 setc "white wait 1] \par setc \f0 :hold-t-color \par end\f1 \par \f0 \par \par to get-holes \par ;examine display board, and report \par ;position of holes. \par make "holes [] \par dotimes [i 15] \par [make "x (word "t (:i + 1)) \par if (invisible-tur? :x) \par [;show :x \par make "y bf :x \par ;show :y \par make "holes lput :y :holes] \par ] \par output :holes \par end \par \par \par \f1 to get-red \par \f0 ;report position of red peg as \par ;number 0-15, where 0 = no red peg.\f1 \par make "red-pos 0 \par dotimes [i 15] \par [make "x (word "t (:i + 1)) \par if (t-color :x) = "red \par [make "red-pos :\f0 i + 1\f1 ] \par ] \par output :red-pos \par end \par \f0 \par \par ;;;;;;; PEG ANALYSIS SECTION ;;;;;;;;;;;; \par \par \par \cf2\f1 ;FIX ... no need for different formated \par ;brains for game-play and analysis \par \cf1 \par \f2 to make-brain \par \f1 ;make brain for \f0 analysis\f1 \par ;\f0 brain\f1 = list of valid moves for holes 1-15 \par \f2 ;\f3 ...(\f2 meaning: move 3 over 2 to 1\f3 ) \par \f2 \par make "brain (list \par [[1 2 3][1 6 10]] \par [[2 3 4][2 7 11]] \par [[3 4 5][3 8 12][3 7 10][3 2 1]] \par [[4 3 2][4 8 11]] \par [[5 4 3][5 9 12]] \par [[6 7 8][6 10 13]] \par [[7 8 9][7 11 14]] \par [[8 7 6][8 11 13]] \par [[9 8 7][9 12 14]] \par [[10 11 12][10 13 15][10 6 1][10 7 3]] \par [[11 7 2][11 8 4]] \par [[12 8 3][12 11 10][12 9 5][12 14 15]] \par [[13 11 8][13 10 6]] \par [[14 12 9][14 11 7]] \par [[15 13 10][15 14 12]]) \par end \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par to init-analysis \par ;cc \par make-brain ; \f3 make \f2 brain for analysis \par ; \par ; \par ; GLOBAL VARIABLES \par ; \par \f3 ;\f2 make "red.position 0 ;see get-red procedure \par \f3 ;\f2 make "red.position.hold 0 ; init as empty \par \f3 ;\f2 \par make "holes-i [] \par ;[1 2 3 5 10 12 13 14] \par make "holes-w [] \par ;[2 3 5 10 12 13 14] \par make "holes-c [] \par ;[1] \par make "path-i [] \par ;[[4 5] [8 12] [7 10] [2 1]] \par make "path-w [] \par ;[[8 12] [7 10] [2 1]] \par make "path-c [] \par ;[4 5] \par make "path-u [] \par ; \par ; STACK (FILO) \par ; \par ;the following 4 globals comprise \par ;the STACK \par \f3 ;Screened means:- \par ;... holes can be jumped into. \par ;... moves can be done.\f2 \par \f3 ;\f2 \par make "stk1 [] \par ; has moved pegs\f3 (ex. 5 over 4 to 3)\f2 \par ; [[3 4 5]] \par make "stk2 [] \par ; has screened paths (moves) remaining \par ; [[3 8 12][3 7 10][3 2 1]] \par make "stk3 [] \par ; has screened holes remaining \par ; [3 5 12 13] \par make "stk4 [] \par ; has true (un-screened) holes prior to the move \par ; [1 2 3 5 10 12 13 14] \par ; \par ; FIRST ON STACK \par ; \par ;the following are first\f3 -of-stack\f2 items when \par ;the STACK is POPed \par make "f.stk1 [] \par make "f.stk2 [] \par make "f.stk3 [] \par make "f.stk4 [] \par ; \par \f1 make "1st-clk-sw "true ;reset 1st click status \par make "flip-sw "off \par \cf2\f0 ;\f1 set "t16 "visible? "false \par \f0 t16, ht\f1 \par \cf1 make "red-sw "off \par \cf2 set "t17 "visible? "false \par \f0 t17, ht\f1 \par \cf1 announce [The displayed peg board will be analyzed. Change display if desired.] \par ;turn analysis light ON \par \cf2 set "t18 "visible? "true ;set analysis indicator ON \par \f0 t18, st\f1 \par \cf1 make "analysis-sw "ON \par \f3 ;\f2 \par make "peg-cnt-1 0 ;\f3 has num of 1-peg-seq(s) found\f2 \par make "counter [] ;\f3 has num of 1-peg-seq(s) found\f2 \par make "last-seq-found [] ;\f3 has the last 1-peg-seq found \par ; \par \f2 ;get info from player \par make "requested-end-pos get-ending-hole ; 0, OR 1-15 \par make "nth-find get-seq-option ; 1 or 100 or 1000 \par tto "counter ct ; clear counter display \par tto "sequences ct ; clear sequence display \par print se "starting-holes= :st-holes \par print se "red-turtle-position= :red.position \par print se "requested-ending-position= :requested-end-pos \par ; \par \f3 ;the following error should never occur!\cf2\f2 \par \cf1 if member? :red.position :st-holes \par [show "error-red-position-conflict \par abort] \par \f3 ;\f2 \par end \par \par ;;;;;;;;;;;;;;;;;;;;;; \par to get-seq-option \par ;\f3 report user selected display option. \par ;\f2 \par make "nth-find [] \par \f3 ;\f2 [Choose the number of Analysis Answers (resultant 1 peg sequences) that are to be displayed.\f3 ]\f2 \par \f3 Q1 \par \f2 if answer = "a \par [make "nth-find 1000] \par if answer = "b \par [make "nth-find 100] \par if answer = "c \par [make "nth-find 1] \par if (empty? answer) \par [make "nth-find 1\f3 000\f2 ] \par \f3 ;\f2 if (answer\f3 = []\f2 ) \par \f3 ;\f2 [make "nth-find 1000] \par \par if NOT :nth-find = [] \par [output :nth-find] \par get-seq-option \par end \par \par \par to Q1 \par text1, ct \par print [Choose the number of Analysis Answers to be displayed. (No entry ... defaults to a).)] \par print [a) ... every 1000th find.] \par print [b) ... every 100th find.] \par print [c) ... every find.] \par question text1\f4 \par \f2 end \par \par \par ;;;;;;;;;;;;;;;;;;;;;; \par to get-ending-hole \par ;\f3 report user selected ending hole. \par ;\f2 \par make "valid-answer [] \par \f3 ;\f2 [Name the \cf2 hole\cf1 in which the last turtle is to end...\f3 ] \par Q2\f2 \par ; \par ifelse OR (answer = 0) (empty? answer) \par [make "valid-answer 0] \par [if (number? answer) \par [if AND (answer > 0) (answer < 16) \par [make "valid-answer answer] \par ] \par ] \par if NOT :valid-answer = [] \par [output :valid-answer] \par get-ending-hole \par end \par \par \par to Q2 \par text1, ct \par print [\f3 I\f2 dentify the \cf2 hole\cf1 in which the last turtle is to end\f3 .] \par print [\f2 Enter a number from 0 to 15\f3 .] \par print [\f2 (No entry ... defaults to 0.)\f3 \f2 ] \par \f3 print [ ]\f2 \par print [0 ... means the last turtle may end in ANY hole position.] \par question text1 \par end \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par to report \par ;conditionally report the \par ;contents of :stk1 \par ;This procedure is called when \par ;analysis determines there is \par ;no peg jump possible. \par \f3 ;\f2 \par make "actual-end-pos 0 ;actual end position \par make "t1 count :stk1 \par make "t2 count :st-holes \par make "t3 15 - :t1 - :t2 \par ;if 1 peg left \par if (:t3 = 1) \par [make "actual-end-pos (first first :stk1) \par ;is ending condition satisfied? \par if OR (:requested-end-pos = 0) (:actual-end-pos = :requested-end-pos) \par [make "last-seq-found :stk1 \par make "peg-cnt-1 :peg-cnt-1 + 1 \par tto "counter \par ct \par print :peg-cnt-1 \par ;is report display condition satisfied? \par if OR (:peg-cnt-1 = 1)(remainder :peg-cnt-1 :nth-find) = 0 \par [tto "sequences \par print se "SEQ se :peg-cnt-1 compress :stk1 \par ;save :red.position for \par ;the last reported move sequence. \par if NOT :red.position = 0 \par [make "red.position.hold (first first :stk1)] \par ] \par ] \par ] \par end \par \par \par \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par \cf3 to rcv.tree :holes-i \par ;the input parameter changes \par ;as the tree of holes is recursively processed. \par \f3 ;\f2 \par \cf1 ;screen given holes \par make "holes-s (screen.holes :holes-i [] :holes-i) \par \f3 ;\f2 \par ; \par ;h? \f3 =\f2 :holes-s (... screened holes) \par ;s? \f3 =\f2 :stk1 (... stack of moves) \par \f3 ;0 = empty \par ;1 = not empty\f2 \par ; \par ;[h? s?]...[0 0][0 1][1 0][1 1] \par if AND (empty? :holes-s) (empty? :stk1) \par [;A-BRANCH \par ;[h? s?]...[0 0] \par ;report the LAST \f3 (\f2 1 PEG\f3 Left)\f2 SEQ Found \par \cf2 \cf1 tto "sequences \par print se "SEQ se :peg-cnt-1 compress :last-seq-found \par tto "counter ct ;clear counter display \par print :peg-cnt-1 \par \par STOP ;exit A-BRANCH & exit rcv.tree \par ] \par \par ;[h? s?]...[0 1][1 0][1 1] \par ifelse NOT (empty? :holes-s) \par \par [;C-BRANCH \par ;[h? s?]...[1 0][1 1] \par \cf4 \cf1 \par ;regardless of stack status \par ;process the first of the \par ;screened hole(s), record (in the stack) \par ;the move made and remaining unprocessed \par ;holes and paths, and report new hole \par ;status. \par \par make "holes-u (proc.a.hole :holes-s :holes-i []) \par \par ;exit C-BRANCH to D-BRANCH \par ] \par \par \par [;B-BRANCH \par ;[h? s?]...[0 1] \par ;report the sequence of moves accumulated \par ;in :stk1 \par \cf4 \cf1 REPORT \par \par ;POP the Stack to find remaining path(s) \par ;and holes(s) that still require processing. \par ;Pop the stack as much as needed and \par ;report stack status to the variable :case. \par \cf4 \par \cf1 \par make "case POPSTACK \par \par \par ;setup :holes-u based on popstack status \par \par if :case = 1 \par [;process remaining screened path(s) & hole(s) \par make "holes-u (proc.a.hole :f.stk3 :f.stk4 :f.stk2) \par ;exit CASE to D-BRANCH \par ] \par if :case = 2 \par [;process remaining screened holes \par make "holes-u (proc.a.hole :f.stk3 :f.stk4 []) \par ;exit CASE to D-BRANCH \par ] \par if :case = 3 \par [;no remaining screened paths OR holes \par make "holes-u [] \par ;exit CASE to D-BRANCH \par ] \par ;end case \par ] \par ;end of B-BRANCH \par ;exit B-BRANCH to D-BRANCH \par \par ;D-BRANCH \par \par ;recursively call rcv.tree to \par ;process new set of holes \par \cf3 rcv.tree :holes-u \par \cf1 end \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par to proc.a.hole :holes-w :holes-f :paths-r \par \f3 ;function: \par \f2 ;process the first of the \par ;screened hole(s), record (in the stack) \par ;the move made and remaining unprocessed \par ;holes and paths, and report new hole \par ;status. \par \f3 ; \par \f2 ;process: \par ;store \f3 the \f2 move\f3 d peg\f2 status in :stk1 \par ;store remaining path & hole status in :stk2 & :stk3 \par ;store pre-move hole status in :stk4 \par ;report new hole status (result of peg move) \par ; \par ;parameters: \par ; holes-w = screened holes (NOT null) \par ; holes-f = true holes (pre-move hole status) \par ; paths-r = screened paths (null or list) \par ;Screened means:- \par ;... holes can be jumped into. \par ;... moves can be done. \par \cf5\f3 ;\f2 \par \cf1 make "holes-h :holes-w ; save for possible push adj. \par make "hole-c (first :holes-w);read 1st hole \par make "holes-w (butfirst :holes-w);delete 1st hole \par \par ifelse (empty? :paths-r) \par [;get set of paths from brain \par make "paths-r (item :hole-c :brain) \par ;screen the set of paths \par make "paths-r (screen.paths :paths-r [] :holes-f) \par ] \par [;remainder screened paths was given \par ] \par make "path-c first :paths-r \par make "paths-w (butfirst :paths-r) \par \f3 ;\f2 \par ;PUSH move info onto STACK \par \f3 ; \par ;NICE if there was a PUSHSTACK Procedure\f2 \par ;PUSHSTACK f.stk1 >> stk1, etc. \par \f3 ;\f2 \par ;Sample stack: \par ;stk1 = [[1 2 3]] \par ;stk2 = [[]] \par ;stk3 = [[4 10]] \par ;stk4 = [[1 4 5 6 7 8 9 10 14]] \par make "stk1 fput :path-c :stk1 ;moved path \par make "stk2 fput :paths-w :stk2 ;remaining screened path(s) \par ;adjust the remaining screened hole(s)... if there \par ;were remaining path(s) present \par ifelse (empty? :paths-w) \par [make "stk3 fput :holes-w :stk3] \par [make "stk3 fput :holes-h :stk3] \par make "stk4 fput :holes-f :stk4 ;true holes prior to moved path \par \f3 ;\f2 \par ;setup new set of holes after valid move \par ;was made. \par make "p0 last first :stk1 \par make "p1 first first :stk1 \par make "p2 butfirst first :stk1 \par make "p3 first :stk4 \par ; \par ;if the peg being moved is RED, then \par ;update the red.position variable \par if :p0 = :red.position \par [make "red.position :p1] \par \f3 ;\f2 \par make "new-holes setup.new.holes :p1 :p2 :p3 \par \f3 ;\f2 \par output :new-holes \par end \par \par \par \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par \cf3 to screen.holes :holes-n :holes-u :holes-i \par \f3 ;function: \par \cf1\f2 ;compare :holes-n against :holes-i \par ;output new set of holes with invalid \par ;holes removed. Also check for red-peg \par ;restrictions. \par \f3 ; \par ;inputs: \par \f2 ;\f3 hole\f2 s-n = set of unscreened \f3 holes\f2 to be processed \par ;CAUTION: \f3 hole\f2 s-n \f3 may\f2 be null on initial entry. \par ;\f3 hole\f2 s-u = accumulation variable for screened \f3 holes\f2 \par ;CAUTION:\f3 hole\f2 s-u must be null on initial entry. \par ;holes-i = set of unscreened holes (remains unchanged \par ;during recursive loop). \par \f3 ;\f2 \par ;\f3 screened hole:- if a peg can be moved into a hole, then \par ;the hole is valid. \par ;\f2 \par if (empty? :holes-n) \par [ \par op :holes-u \par ] \par \f3 ;get a hole from the list of given holes\f2 \par make "hole-x (last :holes-n) \f3 \par ;get a set of unscreened moves \f2 \par make "path-x (item :hole-x :brain) \par \f3 ;screen the set of moves\f2 \par make "paths-u (screen.paths :path-x [] :holes-i) \par ifelse (NOT empty? :paths-u) \par [\cf4 \par \cf1 make "holes-u (fput :hole-x :holes-u) \par ] \par [ \par ;add nothing to holes-u \par ] \par \f3 ;recursively process the next hole\f2 \par \cf3 screen.holes (butlast :holes-n) :holes-u :holes-i\cf1 \par end \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par \cf3 to screen.paths :paths-n :paths-u :holes-i \par ;function: \par \cf1 ;compare :paths-n against :holes-i \par ;output new set of paths with all \par ;invalid path/moves removed. Also \par ;check for red-peg restrictions. \par \cf3 ; \par \cf1 ;input: \par ;paths-n = set of unscreened paths to be processed \par ;CAUTION: paths-n must NOT be null on initial entry. \par ;paths-u = accumulation variable for screened paths \par ;CAUTION: paths-u must be null on initial entry. \par ;holes-i = set of unscreened holes (remains unchanged \par ;during recursive loop). \par ; \par \par if (empty? :paths-n) \par [ \par op :paths-u \par ] \par make "path-c (last :paths-n) ;get last of paths-n \par ifelse valid.path? :path-c :holes-i \par [;add path-c to paths-u\cf4 \par \cf1 make "paths-u fput :path-c :paths-u \par ] \par [;add nothing to paths-u \par ] \par \f3 ;recursively process the next path\f2 \par \cf3 screen.paths (butlast :paths-n) :paths-u :holes-i \par \cf1 end \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par \par to valid.path? :path-n :holes-n \par ;function: \par ;check if path-n is valid, \par ;to be valid the peg-y and peg-z positions in path-n \par ;must not be in the list of holes in holes-n \par ;and peg-y must NOT be a red peg. \par ; \par ;assume path-n has [hole-x peg-y peg-z] \par ;assume holes-n has [h1 h2 h3 h4 ... hn] \par ;where peg-z is to be moved over peg-y \par ;into hole-x \par ;assume hole-x was verified to be a hole \par ;by previous calling procedures. \par ; \par make "from (last :path-n) \par make "over (item 2 :path-n) \par if :over = :red.position \par [op "false] \par ifelse OR (member? :from :holes-n) (member? :over :holes-n) \par [op "false] \par [op "true] \par end \par \par \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par to setup.new.holes :rem :add :list \par ;remove a hole from list then add two \par ;new holes to list then output new list \par ; \par ;show setup.new.holes 7 [8 9] [1 2 3 5 7 10 11] \par ;[8 9 1 2 3 5 10 11] \par \par make "temp removeit :rem :list \par \par make "temp fput (last :add) :temp \par \par make "temp fput (first :add) :temp \par op :temp \par end \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par \par to \f3 POPSTACK\f2 \par ;\cf2\f3 \f2 \par ;CAUTION: STACK elements must NOT be \par ;EMPTY when calling pop.stk\f3 (n)\f2 \par \cf1 make "f.stk1 pop.stk1 \par make "f.stk2 pop.stk2 \par make "f.stk3 pop.stk3 \par make "f.stk4 pop.stk4 \par ; \par ;update :red.position as you back-up \par ;thru the stack. \par \par if NOT empty? :f.stk1 \par [if (first :f.stk1) = :red.position \par [make "red.position (last :f.stk1)] \par ] \par if (NOT empty? :f.stk2) \par [;remaining path(s) was on stack \par output 1 \par ] \par if (NOT empty? :f.stk3) \par [;remaining hole(s) was on stack \par output 2 \par ] \par if (empty? :f.stk1) \par [;NO path(s) OR hole(s) OR moves were on stack \par output 3 \par ] \par ;recursively call popstack \par POPSTACK \par end \par \cf2 \par \cf1 \par to pop.stk1 \par ;OUTPUT FIRST MEMBER OF STK1 \par ;AND THEN DELETE FIRST MEMBER OF STK1 \par if (empty? :stk1) \par [op []] \par make "temp first :stk1 \par make "stk1 butfirst :stk1 \par op :temp \par end \par \par to pop.stk2 \par ;OUTPUT FIRST MEMBER OF STK2 \par ;AND THEN DELETE FIRST MEMBER OF STK2 \par if (empty? :stk2) \par [op []] \par make "temp first :stk2 \par make "stk2 butfirst :stk2 \par op :temp \par end \par \par to pop.stk3 \par ;OUTPUT FIRST MEMBER OF STK3 \par ;AND THEN DELETE FIRST MEMBER OF STK3 \par if (empty? :stk3) \par [op []] \par make "temp first :stk3 \par make "stk3 butfirst :stk3 \par op :temp \par end \par \par to pop.stk4 \par ;OUTPUT FIRST MEMBER OF STK4 \par ;AND THEN DELETE FIRST MEMBER OF STK4 \par if (empty? :stk4) \par [op []] \par make "temp first :stk4 \par make "stk4 butfirst :stk4 \par op :temp \par end \par \par \par \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par to removeit :member :list \par ;REMOVEIT outputs new list with ALL \par ;occurances of member removed from list. \par ;show removeit 3 [1 2 3 4 5 3 6] \par ;[1 2 4 5 6]\cf2 \par \cf1 repeat (count :list) \par [ifelse :member = (first :list) \par [make "list butfirst :list] \par [make "list lput (first :list) :list \par make "list butfirst :list] \par ] \par op :list \par end \par \par ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; \par \par \par \f1 to compress :L.old \par ;reverse and compress items & items within items \par ; :L.old = [[1 2 3] [4 5 6][7 8 9][10 11 12]] \par ; :L.new = [[12 10][9 7][6 4][3 1]] \par make "L.new [] \par dotimes [i count :L.old] \par [make "L.x item (:i + 1) :L.old \par make "L.y list (last :L.x) ( first :L.x) \par make "L.new fput :L.y :L.new \par ] \par output :L.new \par end \par \par \f2 \par \par \par \par ;;;;;; JUNK ;;;;;;;;;;;;;;;;; \par \f3 ;\f2 \par ;;;;;; END JUNK ;;;;;;;;;;;;; \par \pard\qc \par \par \pard \par \par \par \par \par \par \par \par \f1 \par \par \par \par \par \par \f0 \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \par \pard \par } {pagenamepage1curturtlet17curtextsequencestransition0Dturtle-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]Cmouse-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]bg0XbufferX$6H`~2Pn"@^|0Nl >\z.R|$Nw:a$Kr A n " O |  - W # A _ } ( [ 'Z&Y%X*i1|KM%X!?]{SC3o#_O?)CQ e 7!s!!!"?"]"{"""""#/#V###"$j$$$B%%%&b&&&:'''(Z(((2)z)) *X**<++$,,-}--a..E///80001+1I1g111111292Z2223S333F4449555,6}667p778c889V999[::3;;W<<u=>>'??A@@%AAAB`BBBBBC;CYCwCCCCC D+DIDgDDDDDDE9EWEuEEEEE F)FGFeFFFFFFG7GUGsGGGGG H'HEHcHHHHHHI5ISIqIIIIIJ%JCJaJJJJJJK3KQKoKKKKKL#LAL_L}LLLLLM1MOMmMMMMMN!N?N]N{NNNNNO/OMOkOOOOOPP=P[PyPPPPPQ-QKQiQQQQQQQyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyobject typet namet1locked?true xpos209 ypos69 shape0penstate0 size40pencolor55167 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]coloringreen~objecttypebuttonnamebutton1rect[406 92 84 42]show-name?falselocked?truefcn[reset] kind1}objecttypebuttonnamebutton2rect[376 52 51 26]show-name?falselocked?truefcn[flip] kind1}objecttypebuttonnamebutton3rect[440 52 51 26]show-name?falselocked?truefcn[quit] kind1}objecttypebuttonnamebutton4rect[26 118 51 26]show-name?falselocked?truefcn[demo] kind1object typet namet2locked?true xpos169 ypos115 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet3locked?true xpos132 ypos166 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet4locked?true xpos95 ypos218 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet5locked?true xpos61 ypos272 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet6locked?true xpos246 ypos117 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet7locked?true xpos207 ypos168 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet8locked?true xpos171 ypos219 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet9locked?true xpos136 ypos271 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet10locked?true xpos287 ypos166 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet11locked?true xpos250 ypos217 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet12locked?true xpos209 ypos272 shape0penstate0 size40pencolor247 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinredobject typet namet13locked?true xpos318 ypos219 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet14locked?true xpos286 ypos275 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobject typet namet15locked?true xpos365 ypos271 shape0penstate0 size40pencolor0 heading0 pensize1shown?truefcn[clicked] kind1 shapein0have-list[has]colorinblackobjecttypebuttonnamebutton5rect[26 53 84 42]show-name?falselocked?truefcn[analyze] kind1object typet namet16locked?true xpos402 ypos35 shape3penstate0 size40pencolor63479 heading0 pensize1shown?false fcn[] kind1shapeinspherehave-list[has]colorinyellow`object typetextnameinstructionsrect[522 14 205 260]show-name?truelocked?truevisible?truesnaped?false onread||text{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fswiss\fprq2\fcharset0 Arial;}{\f2\fnil Arial;}{\f3\fswiss\fprq2 Arial;}} {\colortbl ;\red0\green0\blue0;\red255\green0\blue0;\red0\green0\blue255;} \viewkind4\uc1\pard\cf1\fs20 \b\f1 TURTLE PEG GAME \par \par Object\b0\f0 : Jump a turtle and remove it. etc... etc. \par Leave \cf2\b\f1 one\cf1\b0\f0 , you're a \cf2\b\f1 genius\cf1\b0\f0 . \par Leave two, you're purty smart. \par Leave three, ... etc. \par \par Left click a turtle \f2 to select\f0 , then \par Left click the hole to go to. \par \par \b\f3 Rules: \b0 Arrange the display window with 1 hole and 14 turtles. One turtle may \b optionally\b0 be red. A red turtle may NOT be jumped.\b \par \b0\f0 \par Use \cf3\b\f1 flip\cf1\b0\f0 mode switch to remove or replace turtle(s) on the board. When indicator light is ON, select \par desired turtle/hole. Turn the switch OFF when done. \par \par Use \cf3\b\f1 red\cf1\b0\f0 mode switch to insert a red turtle. When indicator light is ON, select desired turtle/hole. \par \par If after you have tried to get down to 1 turtle (and failed a thousand times), click \cf3\b\f1 demo\cf1\b0\f0 or \cf3\b\f1 analyze\cf1\b0\f0 to see how clever the turtle is. \par The text boxes (\cf3\b\f1 sequences\cf1\b0\f0 and \cf3\b\f1 counter\cf1\b0\f0 ), show the sequence of moves that can result in 1 turtle left, and the count of these sequences. \par \par The analysis of some sequences may take an hour or more to compute ... (depending on machine speed). The analysis light will turn OFF when analysis is completed. Click \cf3\b\f1 abort\cf1\b0\f0 to terminate an analysis. \par \par \i\f1 Concurrent\i0\f0 game play and analysis is possible, provided play does not encounter an error message. \par \par \b\f1 Credits:\b0\f0 Original Peg Board Game was designed by Ollie Qualls and Sons. \par \par MicroWorlds/Turtle Peg Game designed by J. \par } |objecttypebuttonnamebutton6rect[317 51 42 26]show-name?falselocked?true fcn[red] kind1object typet namet17locked?true xpos337 ypos33 shape3penstate0 size40pencolor63479 heading0 pensize1shown?false fcn[] kind1shapeinspherehave-list[has]colorinyellow5object typetextnamecounterrect[406 213 79 40]show-name?truelocked?truevisible?truesnaped?false onread||text{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\fs20 \par } object typetextnamesequencesrect[27 313 610 79]show-name?truelocked?truevisible?truesnaped?false onread||text{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\fs20 starting-holes= 1 \par red-turtle-position= 12 \par requested-ending-position= 0 \par \par } object typet namet18locked?true xpos68 ypos35 shape3penstate0 size40pencolor63479 heading0 pensize1shown?false fcn[] kind1shapeinspherehave-list[has]colorinyellowobjecttypebuttonnamebutton7rect[405 150 83 32]show-name?falselocked?truefcn[abort] kind1object typetextnametext1rect[407 303 304 95]show-name?truelocked?truevisible?falsesnaped?false onread||^text{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;} \viewkind4\uc1\pard\cf1\fs20 Choose the number of Analysis Answers to be displayed. ( No entry ... defaults to a ) . ) \par a ) ... every 1000th find. \par b ) ... every 100th find. \par c ) ... every find. \par \par }