Traducciones de esta página:

Herramientas de usuario

Herramientas del sitio


es:los_barcos

LOS BARCOS

Ficha

Los_Barcos_p1.jpg

Autor Eduard de Bru de Sala
Computadora Amstrad PCW 8256 / 8512 / 9512
Año 1986
Género Tablero
Controles Teclado
Lenguajes Español
Estado Preservado

Capturas

Los_Barcos_screenshot01.png Los_Barcos_screenshot02.png Los_Barcos_screenshot03.png Los_Barcos_screenshot04.png

Descripción

El clásico juego de hundir la flota. Se trata del archiconocido juego de los barquitos, un programa muy bien presentado y que hará que pasemos largas y amenas horas jugando contra nuestro ordenador.

Tras introducir el nombre, nos dejará que situemos nosotros primero los barcos. Como ya sabéis nuestra misión en este fabuloso juego será hundir los barcos enemigos para ganar la partida.

Listado

  • Listado - BARCOS.BAS
0 REM  Eduard de Bru de Sala. Sep. 1986
10 ' inicializacion de funciones y variables
20 esc$=CHR$(27)
30 home$=esc$+"H"
40 inv$=esc$+"p": nor$=esc$+"q"
50 cls$=esc$+"E"+home$
60 curon$=esc$+"e"
70 curoff$=esc$+"f"
80 beep$=CHR$(7)
90 DEF FN tab$(col%,fil%,texto$)=esc$+"Y"+CHR$(32+fil%)+CHR$(32+col%)+texto$
100 DEF FNbox$ (k1%,k2%,k3%,k4%,k5%,k6%)=esc$+"Y"+CHR$(32+k2%)+CHR$(32+k1%)+CHR$(k3%)+STRING$(k4%,CHR$(k5%))+CHR$(k6%)
110 ' dibujar el tablero
120 PRINT cls$;curoff$:FOR i%=1 TO 4
130 READ k%: q$(i%)=q$(i%)+CHR$(k%)
140 READ k%,l%: p$=CHR$(k%)+CHR$(k%)+CHR$(k%)+CHR$(l%)
150 FOR j%=1 TO 10 : q$(i%)=q$(i%)+p$:NEXT
160 READ k%,l%: p$=CHR$(k%)+CHR$(k%)+CHR$(k%)+CHR$(l%)
170 q$(i%)=q$(i%)+p$:NEXT
180 FOR m=1 TO 2
190 IF m=1 THEN a=0:b=-2:c=2 ELSE a=45:b=43:c=47
200 PRINT FN tab$(a,3,q$(1))
210 FOR i%=3 TO 22 STEP 2: PRINT FN tab$(a,i%+1,q$(2))
220 PRINT FN tab$(a,i%+2,q$(3)):NEXT
230 PRINT FN tab$(a,24,q$(2)):PRINT FN tab$(a,25,q$(4))
240 DATA 150,154,158,154,156
250 DATA 149,32,149,32,149
260 DATA 151,154,159,154,157
270 DATA 147,154,155,154,153
280 ' numerar ejes tablero
290 r$="-1234567890": c$="ABCDEFGHIJ "
300 FOR i%=1 TO 11 :PRINT FN tab$((i%*4)+b,4,MID$(r$,i%,1))
310 PRINT FN tab$(c,4+(i%*2),MID$(c$,i%,1)): NEXT
320 NEXT
330 ' dibujar los marcadores
340 FOR i%=1 TO 11 : READ k1%,k2%,k3%,k4%,k5%,k6%
350 PRINT FNbox$ (k1%,k2%,k3%,k4%,k5%,k6%);: NEXT
360 PRINT FN tab$(0,0,"");
370 READ col%,fil%,texto$
380 PRINT FN tab$(col%,fil%,texto$);
390 DATA 12,0,150,24,154,156,12,1,149,24,32,149,12,2,147,24,154,153
400 DATA 58,0,150,24,154,156,58,1,149,24,32,149,58,2,147,24,154,153
410 DATA 10,26,150,68,154,156,10,27,149,68,32,149,10,28,151,68,154,157
420 DATA 10,29,149,68,32,149,10,30,147,68,154,153
430 DATA 60,1,"     AMSTRAD PCW"
440 PRINT FN tab$(12,27,"Esciba su nombre (maximo 21 caracteres):");
450 PRINT FN tab$(12,29,curon$);:LINE INPUT nom$
460 nom$=LEFT$(nom$,21):nom$=UPPER$(nom$):IF LEN(nom$)<20 THEN nom$=STRING$((21-LEN(nom$))\2," ")+nom$
470 PRINT FN tab$(14,1,nom$+curoff$)
480 REM *****************EL JUGADOR COLOCA LOS BARCOS*********
490 DATA 4,3,3,2,2,2,1,1,1,1
500 FOR i=1 TO 10 :READ m(i):NEXT
510 DIM gu(11,11)
520 FOR i=1 TO 10:FOR j=1 TO 10:gu(i,j)=0:NEXT:NEXT
530 FOR i=1 TO 10
540 PRINT FN tab$(12,27,STRING$(67," "))
550 a$="COLOQUE UN BARCO DE"+STR$(m(i)):PRINT FN tab$(12,27,a$)
560 PRINT FN tab$(12,29,STRING$(67," "))
570 PRINT FN tab$(12,29,"Con las teclas de FLECHAS situese en el lugar, despues pulse RETURN")
580 GOSUB 600
590 NEXT:GOTO 1370
600 x=6:y=6:x1=6:y1=6
610 PRINT FN tab$(x,y,"*")
620 a$=INKEY$:IF a$="" THEN 620
630 IF a$=CHR$(13) AND gu(y\2-2,x\4)=0 THEN 720
640 IF a$=CHR$(1) THEN IF x=6 THEN x=42:GOTO 690 ELSE x=x-4:GOTO 690
650 IF a$=CHR$(6) THEN IF x=42 THEN x=6:GOTO 690 ELSE x=x+4:GOTO 690
660 IF a$=CHR$(31) THEN IF y=6 THEN y=24:GOTO 690 ELSE y=y-2:GOTO 690
670 IF a$=CHR$(30) THEN IF y=24 THEN y=6:GOTO 690 ELSE y=y+2:GOTO 690
680 PRINT beep$;:GOTO 620
690 IF gu(y1\2-2,x1\4)=0 THEN PRINT FN tab$(x1,y1," ") ELSE PRINT FN tab$(x1-1,y1,inv$+"   "+nor$)
700 PRINT FN tab$(x,y,"*")
710 x1=x:y1=y:GOTO 620
720 gu(y\2-2,x\4)=11:PRINT FN tab$(x-1,y,inv$+"   "+nor$) :ret=ret+1
730 xa=x:ya=y
740 IF ret>1 THEN 820
750 REM COLOCA EL BARCO DE 4***********************
760 lx=12:ly=6:GOSUB 1130
770 IF xa=x THEN xl=x-1:xm=x-1:IF ya>y THEN yl=y+2:ym=y+4:FOR j=1 TO 5:PRINT FN tab$(x-1,y+j,inv$+"   "+nor$):NEXT: GOTO 790 ELSE yl=y-2:ym=y-4:FOR j=1 TO 5:PRINT FN tab$(x-1,y-j,inv$+"   "+nor$):NEXT: GOTO 790
780 yl=y:ym=y:IF xa>x THEN xl=x+3:xm=x+7:PRINT FN tab$(x+2,y,inv$+"         "+nor$) ELSE xl=x-5:xm=x-9:PRINT FN tab$(x-10,y,inv$+"         "+nor$)
790 gu(yl\2-2,xl\4)=11:gu(ym\2-2,xm\4)=11
800 GOTO 960
810 REM COLOCA LOS OTROS BARCOS*******************
820 GOSUB 980
830 IF ret=7 OR ret=9 OR ret=11 AND correc=1 THEN GOSUB 1010
840 IF correc=0 THEN ret=ret-1:gu(yy,xx)=0:PRINT FN tab$(xa-1,ya,"   "+beep$):GOTO 600
850 IF ret<>3 AND ret<>5 THEN 910
860 REM COLOCA LOS BARCOS DE 3**********************
870 lx=8:ly=4:GOSUB 1130
880 IF xa=x THEN xl=x-1:IF ya>y THEN yl=y+2:FOR j=1 TO 3:PRINT FN tab$(x-1,y+j,inv$+"   "+nor$):NEXT: GOTO 900 ELSE yl=y-2:FOR j=1 TO 3:PRINT FN tab$(x-1,y-j,inv$+"   "+nor$):NEXT: GOTO 900
890 yl=y:IF xa>x THEN xl=x+3:PRINT FN tab$(x+2,y,inv$+"     "+nor$) ELSE xl=x-3:PRINT FN tab$(x-6,y,inv$+"     "+nor$)
900 gu(yl\2-2,xl\4)=11:GOTO 960
910 IF ret<>7 AND ret<>9 AND ret<>11 THEN 960
920 REM COLOCAR LOS BARCOS DE 2***********************
930 lx=4:ly=2:GOSUB 1130
940 IF xa=x THEN IF ya>y THEN PRINT FN tab$(x-1,y+1,inv$+"   "+nor$): GOTO 960 ELSE PRINT FN tab$(x-1,y-1,inv$+"   "+nor$): GOTO 960
950 IF xa>x THEN PRINT FN tab$(x+2,y,inv$+" "+nor$) ELSE PRINT FN tab$(x-2,y,inv$+" "+nor$)
960 RETURN
970 REM COMPROVAR ALREDEDORES**************************
980 xl=(x-4)\4:xm=(x+4)\4:xx=x\4:yl=(y-2)\2-2:ym=(y+2)\2-2:yy=y\2-2
990 IF gu(yl,xl)=0 AND gu(yl,xx)=0 AND gu(yl,xm)=0 AND gu(yy,xl)=0 AND gu(yy,xm)=0 AND gu(ym,xl)=0 AND gu(ym,xx)=0 AND gu(ym,xm)=0 THEN correc=1 ELSE correc=0
1000 RETURN
1010 gu(0,0)=1:xk=(x-8)\4:xn=(x+8)\4:yk=(y-4)\2-2:yn=(y+4)\2-2
1020 IF xk<0 THEN xk=0
1030 IF xn<0 THEN xn=0
1040 IF yk<0 THEN yk=0
1050 IF yn<0 THEN yn=0
1060 IF gu(yk,xl)=0 AND gu(yk,xx)=0 AND gu(yk,xm)=0 THEN 1110
1070 IF gu(yl,xk)=0 AND gu(yy,xk)=0 AND gu(ym,xk)=0 THEN 1110
1080 IF gu(yl,xn)=0 AND gu(yy,xn)=0 AND gu(ym,xn)=0 THEN 1110
1090 IF gu(yn,xl)=0 AND gu(yn,xx)=0 AND gu(yn,xm)=0 THEN 1110
1100 correc=0
1110 gu(0,0)=0:RETURN
1120 REM SEGUNDA POSICION DEL BARCO********************
1130 a$=INKEY$:IF a$="" THEN 1130
1140 IF  a$=CHR$(1) AND xa-lx>=6 THEN ct=0:x=xa-lx:y=ya:GOTO 1210
1150 IF a$=CHR$(6) AND xa+lx<=42 THEN ct=0:x=xa+lx:y=ya:GOTO 1210
1160 IF a$=CHR$(31) AND ya-ly>=6 THEN ct=0:y=ya-ly:x=xa:GOTO 1210
1170 IF a$=CHR$(30) AND ya+ly<=24 THEN ct=0:y=ya+ly:x=xa:GOTO 1210
1180 IF ct=1 AND a$=CHR$(13) THEN GOTO 1200
1190 IF a$=CHR$(13) AND (xa<>x OR ya<>y) THEN ret=ret+1:GOTO 1280
1200 PRINT beep$;:GOTO 1130
1210 IF ret=3 OR ret=5 THEN GOSUB 980 ELSE GOTO 1230
1220 IF correc=0 THEN ct=1:GOTO 1200
1230 IF ret=7 OR ret=9 OR ret=11 THEN GOSUB 1290 ELSE 1250
1240 IF correc=0 THEN ct=1:GOTO 1200
1250 IF gu(y1\2-2,x1\4)=0 THEN PRINT FN tab$(x1,y1," ")
1260 IF gu(y\2-2,x\4)=0 THEN PRINT FN tab$(x,y,"*")
1270 x1=x:y1=y:GOTO 1130
1280 gu(y\2-2,x\4)=11:PRINT FN tab$(x-1,y,inv$+"   "+nor$):RETURN
1290 xl=(x-4)\4:xm=(x+4)\4:xx=x\4:yl=(y-2)\2-2:ym=(y+2)\2-2:yy=y\2-2:xc=xa\4:yc=ya\2-2:con=0
1300 IF gu(yl,xl)=0  AND gu(yl,xm)=0 AND gu(ym,xl)=0  AND gu(ym,xm)=0 THEN con=con+1
1310 IF xc=xx AND yc=yl THEN 1320 ELSE IF gu(yl,xx)=0 THEN con=con+1
1320 IF xc=xl AND yc=yy THEN 1330 ELSE IF gu(yy,xl)=0 THEN con=con+1
1330 IF xc=xm AND yc=yy THEN 1340 ELSE IF gu(yy,xm)=0 THEN con=con+1
1340 IF xc=xx AND yc=ym THEN 1350 ELSE IF gu(ym,xx)=0 THEN con=con+1
1350 IF con=4 THEN correc=1 ELSE correc=0
1360 RETURN
1370 REM   *******************************LA MAQUINA ESCONDE SUS BARCOS
1380 PRINT FN tab$(12,27,STRING$(67," "))
1390 PRINT FN tab$(12,29,STRING$(67," "))
1400 PRINT FN tab$(20,27,"Un momento, estoy colocando mis barcos"+curoff$)
1410 ERASE m
1420 DIM a(10,10),c(10,10),s(16)
1430 d=0
1440 RANDOMIZE a
1450 FOR i=1 TO 10 :FOR t=1 TO 10:a(i,t)=11:c(i,t)=22:NEXT:NEXT
1460 IF d=0 THEN j=1 ELSE j=0
1470 a=INT (10*RND+1):b=INT (10*RND+1)
1480 IF a(a,b)=11 THEN 1490 ELSE 1470
1490 c=INT(2*RND+1)
1500 IF j=1 THEN d=d+1
1510 ON d GOTO 1520,1560,1560,1630,1630,1630,1700,1700,1700,1700,1890
1520 e=INT(7*RND+1)
1530 FOR t=1 TO 7
1540 IF e=t AND (a=t OR a=t+1 OR a=t+2 OR a=t+3) THEN i=t+3:h=e:GOTO 1850
1550 NEXT:GOTO 1520
1560 e=INT(8*RND+1)
1570 FOR t=1 TO 8
1580 IF e=t AND (a=t OR a=t+1 OR a=t+2)  THEN h=e :i=t+2 :f=t-1:g=t+3:GOTO 1600
1590 NEXT
1600 IF t=1 THEN f=1:k=4:GOTO 1740
1610 IF t=8 THEN g=10:k=7:GOTO 1740
1620 IF t=9 THEN 1560 ELSE 1750
1630 e=INT(9*RND+1)
1640 FOR t=1 TO 9
1650 IF e=t AND (a=t OR a=t+1) THEN h=e:i=t+1:f=t-1:g=t+2:GOTO 1670
1660 NEXT
1670 IF t=1 THEN f=1:k=3:GOTO 1740
1680 IF t=9 THEN g=10:k=8:GOTO 1740
1690 IF t=10 THEN 1630 ELSE 1750
1700 i=a:h=a:f=a-1:g=a+1
1710 IF a=1 THEN f=1:k=2:GOTO 1740
1720 IF a=10 THEN g=10:k=9:GOTO 1740
1730 GOTO 1750
1740 IF c=1 AND a(k,b)=11 OR c=2 AND a(b,k)=11 THEN 1760 ELSE 1460
1750 IF c=1 AND a(f,b)=11 AND a(g,b)=11 OR c=2 AND a(b,f)=11 AND a(b,g)=11 THEN 1760 ELSE 1460
1760 FOR t=h TO i
1770 IF c=1 AND a(t,b)=11 OR c=2 AND a(b,t)=11 THEN 1780 ELSE 1460
1780 NEXT
1790 FOR t=f TO g
1800 IF b=10 THEN 1830
1810 IF c=1 AND a(t,b+1)=11 OR c=2 AND a(b+1,t)=11 THEN 1820 ELSE 1460
1820 IF b=1 THEN 1840
1830 IF c=1 AND a(t,b-1)=11 OR c=2 AND a(b-1,t)=11 THEN 1840 ELSE 1460
1840 NEXT
1850 FOR t=h TO i
1860 IF c=1 THEN a(t,b)=d ELSE a(b,t)=d
1870 NEXT
1880 j=1:GOTO 1470
1890 ON ERROR GOTO 1900
1900 RESUME NEXT
1910 REM ****************************EMPIEZA EL JUEGO
1920 PRINT FN tab$(12,27,STRING$(67," ")+beep$):FOR t=1 TO 4:q(t)=0:NEXT:d=0:g=0:f=0:w=0:a=0:e=0:FOR t=1 TO 6:b(t)=0:NEXT
1930 PRINT FN tab$(12,27,STRING$(67," ")):PRINT FN tab$(12,27,"ES SU TURNO"+beep$)
1940 PRINT FN tab$(12,29,STRING$(67," "));
1950 PRINT FN tab$(12,29,"COORDENADAS (p.e. f3, h1,..10=0)? "+curon$);
1960 a$=INKEY$:IF a$="" THEN 1960 ELSE a$=UPPER$(a$):i=ASC(a$)-64:IF i<=10 AND i>=1 THEN 1970 ELSE 1960
1970 PRINT FN tab$(46,29,a$+"-");
1980 a$=INKEY$:IF a$="" THEN 1980 ELSE u=ASC(a$)-48:IF u<=9 AND u>=0 THEN 1990 ELSE 1980
1990 PRINT FN tab$(48,29,a$+curoff$):IF u=0 THEN u=10
2000 PRINT FN tab$(12,27,STRING$(67," "))
2010 IF a(i,u)=12 THEN PRINT FN tab$(55,29,"YA LO HA PUESTO"):FOR t=1 TO 2000:NEXT:GOTO 1930 ELSE a=a+1
2020 IF a(i,u)=11 THEN PRINT FN tab$(42,27,"A  G U A"):pan=1:NEXT:GOSUB 2880:FOR t=1 TO 1000:NEXT::a(i,u)=12:GOTO 2170
2030 FOR t=1 TO 6:IF a(i,u)>6 THEN 2100
2040 IF a(i,u)=t THEN 2060
2050 NEXT
2060 b(t)=b(t)+1:IF t=1 AND b(t)=4 THEN 2100
2070 IF b(t)=3 AND (t=2 OR t=3) THEN 2100
2080 IF b(t)=2 AND (t<=6 AND t>=4) THEN 2100
2090 a(i,u)=12:PRINT FN tab$(42,27,"T O C A D O "):pan=2:GOSUB 2880:FOR t=1 TO 1000:NEXT:GOTO 2170
2100 a(i,u)=12:e=e+1:PRINT FN tab$(40,27,"H U N D I D O"):pan=3:GOSUB 2880:FOR t=1 TO 1000:NEXT:GOTO 2170
2110 PRINT FN tab$(45,27,"OTRA PARTIDA (S)i o (N)o")
2120 PRINT FN tab$(12,29,STRING$(67," ")):PRINT FN tab$(12,29,curon$);
2130 a$=INKEY$: IF a$="" THEN 2130
2140 a$=UPPER$(MID$(a$,1,1)):IF a$="S" OR a$="N" THEN 2150 ELSE 2130
2150 IF a$="S" THEN RUN 
2160 END
2170 IF f=0 THEN 2180 ELSE 2230
2180 z=0:FOR t=1 TO 10:FOR i=1 TO 10:IF c(t,i)=21 THEN z=z+1
2190 IF z=81 THEN 2320
2200 NEXT:NEXT:z=0
2210 b=INT(10*RND+1):c=INT(10*RND+1):IF c(b,c)<>22 THEN 2210
2220 IF q(1)=4 THEN 2680
2230 b$=CHR$(b+64):w=w+1:a$=STR$(c):a$=MID$(a$,2):b$=b$+"-"+a$+"       A=agua; T=tocado; H=hundido"
2240 PRINT FN tab$(12,27,STRING$(67," ")):PRINT FN tab$(12,27,b$)
2250 PRINT FN tab$(12,29,STRING$(67," ")):PRINT FN tab$(12,29,curon$);
2260 a$=INKEY$:IF a$="" THEN 2260 ELSE a$=UPPER$(a$):PRINT FN tab$(12,29,a$);:IF a$="A" OR a$="T" OR a$="H" THEN 2270 ELSE 2250
2270 IF a$="A" AND gu(b,c)=0 THEN c(b,c)=21:GOTO 2830
2280 IF a$="H" AND gu(b,c)=11 THEN GOSUB 2920:c(b,c)=15:g=g+1:GOTO 2600
2290 IF a$="T" AND gu(b,c)=11 THEN 2300 ELSE PRINT FN tab$(20,29,"Seguro ???"+beep$): PRINT FN tab$(12,29,"");:GOTO 2260
2300 GOSUB 2920:f=f+1:c(b,c)=15
2310 IF d=4 OR f=4 THEN 2320 ELSE 2330
2320 PRINT FN tab$(12,27,STRING$(67," ")+curoff$):PRINT FN tab$(12,27,"I M P O S I B L E"):FOR t=1 TO 1500:NEXT:GOTO 2110
2330 FOR t=1 TO 16:s(t)=1:NEXT
2340 IF c(b,c)=15 THEN j=b:i=b:k=c:h=c
2350 i=j:h=k:ON f GOTO 2360,2480,2540
2360 n=INT(4*RND+1):r=1
2370 FOR t=1 TO 4:IF s(t) AND n=t THEN s(t)=0:GOTO 2390
2380 NEXT:GOTO 2460
2390 ON t GOTO 2410,2420,2430,2440
2400 ON n GOTO 2420,2410,2440,2430
2410 IF h<=10-r THEN h=h+r:GOTO 2470 ELSE 2450
2420 IF h>=1+r THEN h=h-r:GOTO 2470 ELSE 2450
2430 IF i>=1+r THEN i=i-r:GOTO 2470 ELSE 2450
2440 IF i<=10-r THEN i=i+r:GOTO 2470
2450 IF f<>1 THEN 2520
2460 IF s(1)=0 AND s(2)=0 AND s(3)=0 AND s(4)=0 THEN 2320 ELSE 2360
2470 IF c(i,h)=22 THEN b=i:c=h:GOTO 2840 ELSE 2350
2480 o=INT(2*RND+1):z=4
2490 FOR t=1 TO 4:IF s(n) AND o=1 AND n=t THEN r=1:s(n)=0:GOTO 2390
2500 IF s(n+4) AND o=2 AND n=t THEN r=2:s(n+4)=0:GOTO 2400
2510 NEXT
2520 FOR t=1 TO z:IF s(t)=0 AND s(t+z)=0 THEN 2320
2530 NEXT:ON f-1 GOTO 2480,2540
2540 p=INT(2*RND+1):z=8
2550 FOR t=1 TO 4:IF s(n) AND o=1 AND p=1 AND n=t THEN r=1:s(n)=0:GOTO 2390
2560 IF s(n+4) AND o=2 AND p=2 AND n=t THEN r=1:s(n+4)=0:GOTO 2400
2570 IF s(n+8) AND o=1 AND p=2 AND n=t THEN r=3:s(n+8)=0:GOTO 2400
2580 IF s(n+12) AND o=2 AND p=1 AND n=t THEN r=3:s(n+12)=0:GOTO 2390
2590 NEXT:GOTO 2520
2600 n=-1:p=-1:o=1:z=f+1:IF f=0 OR b=j AND c<k THEN 2630
2610 IF b=j AND c>k THEN p=-z:z=1:GOTO 2630
2620 z=1:IF b<j THEN o=f+1:GOTO 2630 ELSE n=-(f+1)
2630 FOR t=n TO o:FOR i=p TO z
2640 IF c(b+t,c+i)=15 THEN 2650 ELSE c(b+t,c+i)=21
2650 NEXT:NEXT
2660 FOR t=0 TO 3:IF f=t AND q(t+1)<=3-t THEN q(t+1)=q(t+1)+1:d=0:f=0:GOTO 2840
2670 NEXT:GOTO 2320
2680 FOR t=1 TO 12:s(t)=0:NEXT
2690 FOR t=0 TO 2:IF c(b+(t+1),c)=22 THEN s(3-t)=1
2700 IF c(b-(1+t),c)=22 THEN s(4+t)=1
2710 IF c(b,c+(t+1))=22 THEN s(9-t)=1
2720 IF c(b,c-(t+1))=22 THEN s(10+t)=1
2730 NEXT:IF s(3) OR s(4) OR s(9) OR s(10) THEN 2750 ELSE 2740
2740 c(b,c)=21:GOTO 2180
2750 IF q(2)=3 THEN 2760 ELSE 2230
2760 FOR t=2 TO 10:IF t>=5 AND t<=7 THEN 2780
2770 IF s(t) AND s(t+1) THEN 2790
2780 NEXT:GOTO 2740
2790 IF q(3)=2 THEN 2800 ELSE 2230
2800 FOR t=1 TO 10:IF t=5 OR t=6 THEN 2820
2810 IF s(t) AND s(t+1) AND s(t+2) THEN 2230
2820 NEXT:GOTO 2740
2830 IF f<>0 THEN d=d+1:GOTO 2310
2840 PRINT FN tab$(12,27,STRING$(67," ")+curoff$)
2850 IF e=10 AND g=10 THEN PRINT FN tab$(12,27,"E M P A T E"):FOR t=1 TO 1000:NEXT:GOTO 2110
2860 IF e=10 THEN PRINT FN tab$(12,27,"HA GANADO con "+STR$(a)+" jugadas"):FOR t=1 TO 1000:NEXT:GOTO 2110
2870 IF g=10 THEN PRINT FN tab$(12,27,"HE GANADO con "+STR$(W)+" jugadas"):FOR t=1 TO 1000:NEXT:GOTO 2110 ELSE 1930
2880 fil=4+(i*2):col=47+(u*4)
2890 IF pan=2 OR pan=3 THEN PRINT FN tab$(col-1,fil,inv$+"   "+nor$):GOTO 2930
2900 IF pan=1 THEN PRINT FN tab$(col,fil,"+")
2910 RETURN
2920 fil=4+(b*2):col=1+(c*4):PRINT FN tab$(col,fil,curoff$+"§§§"):RETURN
2930 ci(i,u)=15:IF pan=2 THEN fi=fi+1:ji=i:ki=u:GOTO 2910
2940 ni=-1:pi=-1:oi=1:zi=fi+1:IF fi=0 OR i=ji AND u<ki THEN 2970
2950 IF i=ji AND u>ki THEN pi=-zi:zi=1:GOTO 2970
2960 zi=1:IF i<ji THEN oi=fi+1:GOTO 2970 ELSE ni=-(fi+1)
2970 FOR t=ni TO oi:FOR ii=pi TO zi
2980 IF ci(i+t,u+ii)=15 THEN 3000 ELSE fil=4+((i+t)*2):col=47+((u+ii)*4)
2990 IF col>=51 AND col<=87 AND fil>=6 AND fil<=24 THEN PRINT FN tab$(col,fil,"+")
3000 NEXT:NEXT:fi=0:GOTO 2910

Controles

Para introducir nuestros barcos, lo haremos utilizando las teclas del cursor y seguidamente la tecla RETURN. Una vez comience el juego iremos dando las coordenadas a través del teclado.

      ↑ = ARRIBA
      ↓ = ABAJO
      → = DERECHA
      ← = IZQUIERDA
 RETURN = SELECCIONAR

Carga del programa

1.- Introducir el disco CP/M por la cara 2
2.- Escribir BASIC y esperar a que cargue
3.- Retirar el disco CP/M e introducir el disco que contiene el juego Los Barcos
4.- Teclear run "Barcos" y pulsar la tecla "ENTER"

Extras

  • Listado del programa en una revista de gran tirada de la época

Los_Barcos_programa_01.jpg Los_Barcos_programa_02.jpg Los_Barcos_programa_03.jpg Los_Barcos_programa_04.jpg

Descarga

  • Los Barcos (juego en formato dsk, comprimido con zip)

Enlaces

es/los_barcos.txt · Última modificación: 2017/01/12 11:23 por jevicac