10 REM Octagram Loader 20 REM by M.Bobrowski 11'93 30 : 40 MODE 1:LOMEM=PAGE+&F00:B%=8+?&18:K%=PAGE+&844:VDU 19,0,1;0;19,1,0;0;23,224,63600;63736;112;0; 50 K%?5=B%:K%?24=B%:K%?34=B%:K%?42=B%:K%?50=B%+7:CALL K% 60 PROCoctagram(160,624):PROCoctagram(160,192) 70 PROCarrow:PROCwindow 80 PROCinstruct 90 CHAIN"OCTAGRM" 100 : 110 DEF PROCoctagram(H%,V%) 120 MOVE H%-96,V%:GCOL0,2:FOR A=0 TO 6*PI STEP 0.75*PI 130 X%=H%+INT(COSA*96+0.5):Y%=V%+INT(SINA*96+0.5):DRAW X%,Y% 140 NEXT:MOVE H%,V%-96:DRAW H%,V%+96 150 VDU5:FOR I%=1 TO 8 160 READ X%,Y%,N$:MOVE H%+X%,V%+Y%:PRINTN$ 170 NEXT:GCOL0,3:MOVE H%-8,V%+8:VDU224,4 180 ENDPROC 190 : 200 DATA -128,12,1,-96,100,4,-12,132,7,68,100,6,104,12,5,76,-67,2,-12,-108,8,-104,-67,3 210 DATA -128,12,7,-96,100,8,-12,132,1,68,100,2,104,12,3,72,-67,4,-12,-108,5,-100,-67,6 220 : 230 DEF PROCarrow 240 GCOL 0,1:MOVE 176,460:MOVE 176,420:PLOT 85,144,460:PLOT 85,144,420 250 MOVE 188,420:MOVE 160,360:PLOT 85,132,420:ENDPROC 260 : 270 DEF PROCwindow 280 VDU 28,10,30,38,7:COLOUR 129:CLS 290 GCOL 0,3:MOVE 320,32:DRAW 320,799:DRAW 1248,799:DRAW 1248,32:DRAW 320,32 300 VDU 28,11,29,37,8:ENDPROC 310 : 320 DEF PROCinstruct 330 PRINT "At the start of the game" 340 PRINT'"you will see an octagram," 350 PRINT'"or an eight-pointed star," 360 PRINT'"with eight numbers randomly" 370 PRINT "located at its points." 380 PRINT'"Using an additional point" 390 PRINT'"at the centre, move the" 400 PRINT'"numbers to arrange them" 410 PRINT'"clockwise, from 1 to 8," 420 PRINT'"with '1' being at the top." 430 PROCspace 440 PRINT "The only allowed moves are" 450 PRINT'"between points joined with" 460 PRINT'"the straight line. Moreover" 470 PRINT "you may move a number to a" 480 PRINT'"new position (located at" 490 PRINT'"the centre point or at the" 500 PRINT'"periphery of octagram) only" 510 PRINT "if this position is vacant." 520 PROCspace 530 PRINT "If all peripheral points" 540 PRINT'"are occupied (as at the" 550 PRINT'"start of the game) you can" 560 PRINT'"move a number to the centre" 570 PRINT "and keep it there till it" 580 PRINT'"is needed while operating" 590 PRINT'"other numbers." 600 PROCspace 610 PRINT"To move a number press the" 620 PRINT'"corresponding numeric key." 630 PRINT''" Use ESCAPE to restart," 640 PRINT'" ESCAPE + SHIFT to exit." 650 COLOUR2:PRINT''" Now press SPACE to start "; 660 REPEAT UNTIL GET=32 670 ENDPROC 680 : 690 DEF PROCspace 700 COLOUR2:PRINT''" Press space to continue"; 710 REPEAT UNTIL GET=32:CLS:COLOUR3:ENDPROC