Random demo
Random game
Random game
M*N Puzzle M*N Puzzle M*N Puzzle M*N Puzzle
Listing 1
0 GRAPHICS 18:​? #6;" mn ":​R=120:​DIM A$(R),​B$(R),​D(3),​J(15):​S=DPEEK(88)+40:​M=4
1 N=M:​A$=".":​A$(R)=A$:​B$=A$:​FOR I=0 TO 3:​READ D,​J:​D(I)=D:​J(J)=D:​NEXT I:​WHILE 1:​DATA -20,​13,​1,​11
2 REPEAT:​MOVE S,​S+1,​199:​P=S+70-20*(N DIV 2)-M DIV 2:​FOR I=0 TO N*M-2:​X=P+I+(I DIV M)*(20-M)
3 POKE X,​(33-42*(I>25)+I*65) MOD 256:​NEXT I:​PAUSE 9:​REPEAT:​J=15-STICK(0):​K=1-STRIG(0):​UNTIL J+K
4 IF K=0:​M=M+(J&8>0)*(M<6)-(J&4>0)*(M>2):​N=N+(J&2>0)*(N<6)-(J&1>0)*(N>2):​ENDIF:​UNTIL K
5 MOVE S,​ADR(A$),​R:​X=X+1:​Z=X+1:​C=N*M*8:​WHILE C:​REPEAT:​D=RAND(4):​Y=X+D(D):​Q=PEEK(Y):​DATA -1,​7
6 UNTIL Q AND Y<>Z:​SOUND 0,​20+D*3,​8,​8:​POKE Y,​0:​POKE X,​Q:​Z=X:​X=Y:​C=C-1:​WEND:​SOUND:​REPEAT:​DATA 20,​14
7 REPEAT:​J=STICK(0):​Y=X+J(J):​Q=PEEK(Y):​UNTIL Q:​POKE 77,​0:​SOUND 0,​20+J,​8,​8:​POKE Y,​0:​POKE X,​Q
8 X=Y:​PAUSE 8:​SOUND:​C=C+1:​POSITION 9+(C<10),​9:​? #6;C:​WHILE STICK(0)<15:​WEND:​MOVE S,​ADR(B$),​R:​UNTIL B$=A$
9 POSITION 8,​11:​? #6;"done";:​FOR I=0 TO 9:​SOUND 0,​60-5*I,​12,​8:​PAUSE 4:​NEXT I:​SOUND:​WHILE STRIG(0):​WEND:​WEND
10 REM M*N Puzzle
11 REM 2016-03-08
12 REM (c) 2016 by Victor Parada
13 REM <http:​//www.vitoco.cl/atari/>	

This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page, please contact me immediatelly so I can remove it!