|
Post by bluatigro on Apr 1, 2020 14:39:24 GMT
chalence : chage the cardset so that you get many "1"s as posible
card : 1 : put this on tape 2 : move on tape 3 : go to cardset nr
i get the example cardsets from a book [ 1980 ]
'' bluatigro 1 apr 2020 '' turing puzle max = 50 dim code( 3 , 2 ) dim mem$( max ) for i = 1 to 3 for j = 0 to 2 read a$ code$( i , j ) = a$ next j next i '' b 0 1 = on tape data "1r2" , "br3" , "0l2" ''cardset 1 data "1r3" , "1l1" , "bl3" ''cardset 2 data "1l1" , "stop" , "1r1" ''cardset 3
plek = int( max / 2 ) i = 0
while mem$( plek ) <> "stop" j = instr( "b01" , mem$( plek ) ) print code$( i , j ) mem$( plek ) = left$( code$( i , j ) , 1 ) if mid$( code$( i , j ) , 2 , 1 ) = "r" then plek = plek + 1 if plek > max then plek = 0 end if if mid$( code$( i , j ) , 2 , 1 ) = "l" then plek = plek - 1 if plek < 0 then plek = max end if i = val( right$( code$( i , j ) , 1 ) ) wend for i = 0 to max print mem$( i ) ; next i print
|
|