$! ------------------ CUT HERE ----------------------- $ v='f$verify(f$trnlnm("SHARE_VERIFY"))' $! $! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990 $! On 30-MAY-1992 02:23:45.56 By user MASLIB $! $! This VMS_SHARE Written by: $! Andy Harper, Kings College London UK $! $! Acknowledgements to: $! James Gray - Original VMS_SHARE $! Michael Bednarek - Original Concept and implementation $! $! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER $! AND EXECUTE AS A COMMAND PROCEDURE ( @name ) $! $! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING: $! 1. BLIND.INS;1 $! 2. BLIND.PAS;1 $! 3. BLIND.PIC;1 $! 4. BUILD.COM;1 $! $set="set" $set symbol/scope=(nolocal,noglobal) $f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID")) $e="write sys$error ""%UNPACK"", " $w="write sys$output ""%UNPACK"", " $ if f$trnlnm("SHARE_LOG") then $ w = "!" $ ve=f$getsyi("version") $ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START $ e "-E-OLDVER, Must run at least VMS 4.4" $ v=f$verify(v) $ exit 44 $UNPACK: SUBROUTINE ! P1=filename, P2=checksum $ if f$search(P1) .eqs. "" then $ goto file_absent $ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'* $ exit $file_absent: $ if f$parse(P1) .nes. "" then $ goto dirok $ dn=f$parse(P1,,,"DIRECTORY") $ w "-I-CREDIR, Creating directory ''dn'." $ create/dir 'dn' $ if $status then $ goto dirok $ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'* $ exit $dirok: $ w "-I-PROCESS, Processing file ''P1'." $ if .not. f$verify() then $ define/user sys$output nl: $ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1' PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET( SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:= CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b)); LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION( BEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1); IF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE; MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1; ERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")= 1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF"; POSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r); ERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1; COPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE, "output_file"));ENDPROCEDURE;Unpacker;QUIT; $ delete/nolog 'f'* $ CHECKSUM 'P1' $ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT $ e "-E-CHKSMFAIL, Checksum of ''P1' failed." $ ENDSUBROUTINE $START: $ create 'f' X`1B`5BH`1B`5BJ`1B(B`1B`5B0m X`1B`5B1;1H`1B#6`1B(0lqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqk`1B`5B2;1H`1B#6x V x x x x x x x x x x x x x x x x x x x X`1B`5B3;1H`1B#6tqnq`1B`5B7mnqnqnq`1B`5B0mnqn`1B`5B7mqn`1B`5B0mqnqnqnqnqnqnqn Vqnqn`1B`5B7mqn`1B`5B0mqnqu`1B`5B4;1H`1B#6x x `1B`5B7mx x x x`1B`5B0m x`1B`5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B0m x`1B`5B7m x`1B`5B0m x`1B`5B V7m x`1B`5B0m x`1B`5B7m x`1B`5B0m x`1B`5B7m x`1B`5B0m`20 X`1B`5B12;29Hx`1B`5B7m x`1B`5B0m x`1B`5B7m x`1B`5B0m x x`1B`5B13;1H`1B#6tqnq` V1B`5B7mnq`1B`5B0mnqn`1B`5B7mqn`1B`5B0mqn`1B`5B7mqn`1B`5B0mqn`1B`5B7mqn`1B`5B V0mqn`1B`5B7mqn`1B`5B0mqn`1B`5B7mqn`1B`5B0mqn`1B`5B7mq X`1B`5B13;31Hn`1B`5B0mqn`1B`5B7mqn`1B`5B0mqnqu`1B`5B14;1H`1B#6x x `1B`5B7mx x V x x`1B`5B0m x`1B`5B7m x`1B`5B0m x`1B`5B7m x`1B`5B0m x`1B`5B7m x`1B`5B0m x`1 VB`5B7m x`1B`5B0m x`1B`5B7m x x x`1B`5B0m x`20 X`1B`5B14;39Hx`1B`5B15;1H`1B#6tqnq`1B`5B7mnqnqnq`1B`5B0mnqn`1B`5B7mqn`1B`5B0m Vqn`1B`5B7mqn`1B`5B0mqn`1B`5B7mqn`1B`5B0mqn`1B`5B7mqn`1B`5B0mqn`1B`5B7mqnqnqn V`1B`5B0mqnqu X`1B`5B16;1H`1B#6x x x x x x x x x x x x x x x x x x x x`1B`5B17;1H`1B#6tqnqn Vqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B18;1H`1B#6x `1B(B`1B`5B1mGet to as many squares in the maze `1B`5B0m X`1B(0x`1B`5B19;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B20;1H`1B#6x `1B(B`1B`5B1mas you can before the timer expires `1B`5B0m X`1B(0x`1B`5B21;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu`1B`5B22;1H`1B# V6x x x x x x PRESS `1B(B `1B(0x x`20 X`1B`5B22;33Hx x x x`1B`5B23;1H`1B#6mqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqvqj`1 VB`5B1;1H X`1B(B`1B* $ CALL UNPACK BLIND.INS;1 672759662 $ create 'f' X`5B X Inherit`20 X ( X 'SYS$LIBRARY:STARLET', X 'INTERACT' X ) X`5D X XPROGRAM Blind; X XTYPE `7B creating screen `7D X tunnel_pointer = `5Etunneler; X tunneler = Record; X x_posn : integer; X y_posn : integer; X prev : tunnel_pointer; X next : tunnel_pointer; X End; X XVAR `7B creating screen `7D X stack_tunneler : tunnel_pointer; X head_tunneler : tunnel_pointer; X this_tunneler : tunnel_pointer; X up : boolean; X down : boolean; X left : boolean; X right : boolean; X X XVAR `7B general `7D X a : integer; X b : integer; X c : integer; X i : integer; X screen : array `5B0..20,0..12`5D of integer; X x_posn : integer; X y_posn : integer; X command : char; X score : integer; X timer : integer; X X XPROCEDURE Create_tunneler ( x , y : integer ); XVAR X new_tunneler : tunnel_pointer; XBEGIN X IF ( stack_tunneler <> nil ) then X BEGIN X new_tunneler := stack_tunneler; X stack_tunneler := stack_tunneler`5E.next; X END X ELSE X NEW ( new_tunneler ); X X new_tunneler`5E.x_posn := x; X new_tunneler`5E.y_posn := y; X new_tunneler`5E.prev := nil; X new_tunneler`5E.next := head_tunneler; X X IF ( head_tunneler <> nil ) then X head_tunneler`5E.prev := new_tunneler; X head_tunneler := new_tunneler; XEND; X X XPROCEDURE Delete_tunneler; XBEGIN X IF ( this_tunneler`5E.prev = nil ) then X head_tunneler := head_tunneler`5E.next X ELSE X this_tunneler`5E.prev`5E.next := this_tunneler`5E.next; X X IF ( this_tunneler`5E.next <> nil ) then X this_tunneler`5E.next`5E.prev := this_tunneler`5E.prev; X X this_tunneler`5E.next := stack_tunneler; `20 X stack_tunneler := this_tunneler; X this_tunneler := this_tunneler`5E.prev; XEND; X X XFUNCTION Cant_move_from ( x , y : integer ) : Boolean; XBEGIN X up := ( screen`5Bx,y-1`5D = 1 ); X down := ( screen`5Bx,y+1`5D = 1 ); X left := ( screen`5Bx-1,y`5D = 1 ); X right := ( screen`5Bx+1,y`5D = 1 ); X cant_move_from := not ( up or down or left or right ); XEND; X X XPROCEDURE Tunnel_from ( VAR x , y : integer ); XBEGIN X IF cant_move_from(x,y) then X delete_tunneler X ELSE X BEGIN X c := random (2); X IF ( c = 1 ) then X BEGIN X Create_tunneler (x,y); X c := random (2); X IF ( c = 1 ) then X Create_tunneler (x,y); X END; X Reset_randomizer; X REPEAT X c := randomize (4); X UNTIL (( c = 1 ) and up ) or (( c = 2 ) and down ) or X (( c = 3 ) and left ) or (( c = 4 ) and right ); X X CASE c of X 1 : screen`5Bx,y`5D := screen`5Bx,y`5D * 3; X 2 : screen`5Bx,y`5D := screen`5Bx,y`5D * 5; X 3 : screen`5Bx,y`5D := screen`5Bx,y`5D * 7; X 4 : screen`5Bx,y`5D := screen`5Bx,y`5D * 11; X End; X X CASE c of X 1 : screen`5Bx,y-1`5D := screen`5Bx,y-1`5D * 5; X 2 : screen`5Bx,y+1`5D := screen`5Bx,y+1`5D * 3; X 3 : screen`5Bx-1,y`5D := screen`5Bx-1,y`5D * 11; X 4 : screen`5Bx+1,y`5D := screen`5Bx+1,y`5D * 7; X End; X X CASE c of X 1 : y := y - 1; X 2 : y := y + 1; X 3 : x := x - 1; X 4 : x := x + 1; X End; X X END; XEND; X X XPROCEDURE Exhaust_tunnelers; XBEGIN X WHILE ( head_tunneler <> nil ) do X BEGIN X this_tunneler := head_tunneler; X WHILE ( this_tunneler <> nil ) do X BEGIN X tunnel_from ( this_tunneler`5E.x_posn , this_tunneler`5E.y_posn ); X IF ( this_tunneler = nil ) then X this_tunneler := head_tunneler X ELSE X this_tunneler := this_tunneler`5E.next; X END; X END; XEND; X X XPROCEDURE Tunnel; XBEGIN X Create_tunneler (x_posn,y_posn); X Exhaust_tunnelers; X X FOR a := 1 to 19 do X FOR b := 1 to 11 do X IF ( screen`5Ba,b`5D <> 1 ) then X Create_tunneler (a,b); X Exhaust_tunnelers; XEND; X X XPROCEDURE Setup_screen; XBEGIN X FOR a := 1 to 19 do X FOR b := 1 to 11 do X screen`5Ba,b`5D := 1; X X FOR a := 0 to 20 do X BEGIN X screen`5Ba,0`5D := 100; X screen`5Ba,12`5D := 100; X END; X FOR a := 0 to 12 do X BEGIN X screen`5B0,a`5D := 100; X screen`5B20,a`5D := 100; X END; XEND; X X XPROCEDURE Initialize; XBEGIN X show_graphedt ('blind.ins'); X clear; X setup_screen; X x_posn := random(19); X y_posn := random(11); X tunnel; X show_graphedt ('blind.pic',wait:=false); X command := ' '; X posn (x_posn*2,y_posn*2); X qio_write ('*'); X score := 0; X timer := 0; XEND; X X XPROCEDURE Get_command; XBEGIN X command := qio_1_char_now; XEND; X X XPROCEDURE Move; XBEGIN X X CASE command of X '2' : IF (( screen`5Bx_posn,y_posn`5D mod 5 ) = 0 ) then X BEGIN X posn ((x_posn*2),(y_posn*2)); X qio_write (' '); X posn ((x_posn*2),(y_posn*2)+1); X qio_write (' '); X posn ((x_posn*2),(y_posn*2)+2); X qio_write ('*'); X y_posn := y_posn + 1; X END; X '4' : IF (( screen`5Bx_posn,y_posn`5D mod 7 ) = 0 ) then X BEGIN X posn ((x_posn*2)-2,(y_posn*2)); X qio_write ('* '); X x_posn := x_posn - 1; X END; X '6' : IF (( screen`5Bx_posn,y_posn`5D mod 11 ) = 0 ) then X BEGIN X posn ((x_posn*2),(y_posn*2)); X qio_write (' *'); X x_posn := x_posn + 1; X END; X '8' : IF (( screen`5Bx_posn,y_posn`5D mod 3 ) = 0 ) then X BEGIN X posn ((x_posn*2),(y_posn*2)); X qio_write (' '); X posn ((x_posn*2),(y_posn*2)-1); X qio_write (' '); X posn ((x_posn*2),(y_posn*2)-2); X qio_write ('*'); X y_posn := y_posn - 1; X END; X otherwise; X End; `7Bcase`7D X X IF ( (screen`5Bx_posn,y_posn`5D mod 13 ) <> 0 ) then X BEGIN X screen`5Bx_posn,y_posn`5D := screen`5Bx_posn,y_posn`5D * 13; X score := score + 1; X END; XEND; X X XBEGIN X Initialize; X REPEAT X sleep_start (10); X timer := timer + 1; X get_command; X move; X posn (15,24); X qio_write (dec(Score)); X posn (25,24); X qio_write (dec(1000-timer)+' '); X posn (1,1); X sleep_wait; X UNTIL ( timer = 1000 ) or ( upper_case(command) = 'Q' ); X qio_purge; X clear; X top_ten (score); XEND. $ CALL UNPACK BLIND.PAS;1 1885550544 $ create 'f' X`1B`5BH`1B`5BJ`1B`5B0m X`1B(0 X`1B`5B1;1H`1B#6lqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqwqk X`1B`5B2;1H`1B#6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x X`1B`5B3;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B4;1H`1B#6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x X`1B`5B5;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B6;1H`1B#6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x X`1B`5B7;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B8;1H`1B#6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x X`1B`5B9;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B10;1H`1B#6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x X`1B`5B11;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B12;1H`1B#6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x X`1B`5B13;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqnqu X`1B`5B14;1H`1B#6x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x.x X`1B`5B15;1H`1B#6tqnqnqnqnqnqnqnqnqnqnqnqnqnqn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