es:connect_four
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
es:connect_four [2022/06/28 14:14] – [Extras] jevicac | es:connect_four [2022/06/30 10:29] (actual) – jevicac | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
====== CONNECT FOUR ====== | ====== CONNECT FOUR ====== | ||
+ | |||
+ | {{ : | ||
===== Ficha ===== | ===== Ficha ===== | ||
- | {{: | ||
^ Autor | Wayne Gordon | ^ Autor | Wayne Gordon | ||
^ Computadora | Amstrad PCW 8256 / 8512 / 9512 | | ^ Computadora | Amstrad PCW 8256 / 8512 / 9512 | | ||
Línea 17: | Línea 18: | ||
===== Descripción ===== | ===== Descripción ===== | ||
+ | Esta es una implementación para PCW del clásico juego para dos jugadores, que puedes jugar contra la computadora o un amigo. | ||
+ | Es posible jugar cualquier cantidad de juegos en uno de dos niveles: fácil o difícil. | ||
+ | |||
+ | Cuando tu nombre aparece en video inverso es tu turno para jugar. Use las teclas T e Y para mover el marcador a lo largo de la parte superior del tablero, presione la barra espaciadora para dejar caer una ficha e intente conectar una línea de cuatro para ganar el juego. Se le informa cuando alguien ha ganado y se verifican las situaciones en las que nadie puede ganar y se anuncia un sorteo. | ||
+ | |||
+ | Tenga cuidado: su Amstrad no es fácil de vencer, especialmente en el nivel dos, y las horas de planificación cuidadosa pueden desaparecer con un solo movimiento. | ||
+ | |||
+ | Por el contrario, un poco de pensamiento y estrategia pueden sacarlo de las situaciones más difíciles. | ||
Línea 26: | Línea 35: | ||
< | < | ||
- | + | 10 REM | |
+ | 20 REM By Wayne Gordon | ||
+ | 30 REM (c) Computing with the Amstrad | ||
+ | 40 REM ------------ PCW ------------- | ||
+ | 50 GOSUB 1150:GOSUB 1320 | ||
+ | 60 REM Scan keyboard | ||
+ | 70 PRINT FNpo$(0, | ||
+ | 80 IF pl=1 THEN pL1$=" | ||
+ | 90 PRINT FNpo$(0, | ||
+ | 100 PRINT e$+" | ||
+ | 110 PRINT e$+" | ||
+ | 120 INPUT ga:IF ga/ | ||
+ | 130 IF pl=1 THEN PRINT e$+" | ||
+ | 140 PRINT e$+" | ||
+ | 150 IF level=1 THEN level=4 ELSE level=5000 | ||
+ | 160 pL1$=MID$(pL1$, | ||
+ | 170 REM Who's go (even no.=player2) | ||
+ | 180 PRINT FN po$(19, | ||
+ | 190 PRINT e$+" | ||
+ | 200 GOSUB 1230 | ||
+ | 210 x=30: | ||
+ | 220 p1L=count/ | ||
+ | 230 IF p1L THEN te$=STRING$(2, | ||
+ | 240 PRINT FNpo$(x, | ||
+ | 250 IF pl=1 THEN IF p1L THEN GOSUB 970: | ||
+ | 260 a$=INKEY$: | ||
+ | 270 IF LOWER$(a$)=" | ||
+ | 280 IF LOWER$(a$)=" | ||
+ | 290 PRINT FNpo$(x, | ||
+ | 300 IF a$=CHR$(32) THEN PRINT e$+" | ||
+ | 310 GOTO 260 | ||
+ | 320 REM Move | ||
+ | 330 count=count+1 | ||
+ | 340 valid=1: | ||
+ | 350 WHILE valid | ||
+ | 360 y=y+1 | ||
+ | 370 IF y>10 OR FNst$<>"" | ||
+ | 380 IF state$(x, | ||
+ | 390 IF edd THEN state$(x, | ||
+ | 400 WEND | ||
+ | 410 IF count>=6 GOTO 550 | ||
+ | 420 GOTO 220 | ||
+ | 430 REM Drop coin | ||
+ | 440 PRINT FNpo$(x, | ||
+ | 450 IF y=10 THEN edd=1:GOTO 390 | ||
+ | 460 IF state$(x, | ||
+ | 470 GOTO 360 | ||
+ | 480 REM Pick up coin | ||
+ | 490 IF INT(count/ | ||
+ | 500 IF yco>24 THEN yco=17 | ||
+ | 510 IF p1L THEN PRINT FNpo$(xco, | ||
+ | 520 IF count=33 THEN PRINT FNpo$(10, | ||
+ | 530 whe=whe+1: | ||
+ | 540 RETURN | ||
+ | 550 REM check1 | ||
+ | 560 gam=0: | ||
+ | 570 IF test=1 THEN te$=STRING$(2, | ||
+ | 580 g=1:FOR f=x+5 TO x+15 STEP 5: | ||
+ | 590 FOR f=1 TO 3: | ||
+ | 600 FOR f=1 TO 3: | ||
+ | 610 g=1:FOR f=x-5 TO x-15 STEP -5: | ||
+ | 620 FOR f=1 TO 3: | ||
+ | 630 FOR f=1 TO 3: | ||
+ | 640 g=1:FOR f=x+5 TO x+10 STEP 5: | ||
+ | 650 FOR f=1 TO 2: | ||
+ | 660 FOR f=1 TO 3: | ||
+ | 670 g=1:FOR f=x-10 TO x-5 STEP 5: | ||
+ | 680 FOR f=1 TO 2: | ||
+ | 690 FOR f=1 TO 3: | ||
+ | 700 FOR f=1 TO 3: | ||
+ | 710 IF test THEN 1110 | ||
+ | 720 IF game THEN 800 | ||
+ | 730 IF count> | ||
+ | 740 GOTO 220 | ||
+ | 750 gam=0: | ||
+ | 760 WHILE (NOT game AND f<4) | ||
+ | 770 IF state$(xc(f), | ||
+ | 780 IF gam=3 THEN game=1 | ||
+ | 790 f=f+1: | ||
+ | 800 REM Game=Won | ||
+ | 810 game1=game1+1 | ||
+ | 820 IF game1/ | ||
+ | 830 IF p1L THEN pL1=pL1+1 ELSE pL2=pL2+1 | ||
+ | 840 IF pL1=ROUND(ga/ | ||
+ | 850 PRINT FNpo$(21, | ||
+ | 860 PRINT FNpo$(31, | ||
+ | 870 WHILE INKEY$="": | ||
+ | 880 FOR f=30 TO 66 STEP 5:FOR g=1 TO 10: | ||
+ | 890 GOTO 200 | ||
+ | 900 REM Who Won Overall ? | ||
+ | 910 IF p1L THEN te$=pL1$ ELSE te$=pL2$ | ||
+ | 920 PRINT FNpo$(37, | ||
+ | 930 PRINT STRING$(1, | ||
+ | 940 PRINT: INPUT" | ||
+ | 950 PRINT c$;" | ||
+ | 960 END | ||
+ | 970 REM Amstrad' | ||
+ | 980 temp=y: | ||
+ | 990 IF count<6 THEN 1040 | ||
+ | 1000 test=1: | ||
+ | 1010 test=2: | ||
+ | 1020 GOTO 1040 | ||
+ | 1030 RANDOMIZE PEEK(64504!): | ||
+ | 1040 RANDOMIZE PEEK(64504!): | ||
+ | 1050 IF FNst$<>"" | ||
+ | 1060 te$=temp$: | ||
+ | 1070 x=25 | ||
+ | 1080 x=x+5:IF FNst$<>"" | ||
+ | 1090 IF x>60 THEN RETURN | ||
+ | 1100 te$="": | ||
+ | 1110 IF game THEN IF test=1 THEN RETURN | ||
+ | 1120 IF game THEN IF test=2 THEN RETURN | ||
+ | 1130 IF x<61 THEN 1080 | ||
+ | 1140 RETURN | ||
+ | 1150 REM init- | ||
+ | 1160 e$=CHR$(27): | ||
+ | 1170 DEF FNpo$(x, | ||
+ | 1180 DEF FNst$=state$(x, | ||
+ | 1190 DIM state$(80, | ||
+ | 1200 FOR f=1 TO 7:READ datt(f): | ||
+ | 1210 DATA 30, | ||
+ | 1220 RETURN | ||
+ | 1230 REM Draw Coins | ||
+ | 1240 yco=17: | ||
+ | 1250 FOR x=2 TO 11 STEP 4:FOR y=17 TO 24 | ||
+ | 1260 PRINT FNpo$(x, | ||
+ | 1270 NEXT y,x | ||
+ | 1280 FOR x=88 TO 77 STEP -4:FOR y=17 TO 24 | ||
+ | 1290 PRINT FNpo$(x, | ||
+ | 1300 NEXT y,x | ||
+ | 1310 RETURN | ||
+ | 1320 REM screen | ||
+ | 1330 t1$=STRING$(7, | ||
+ | 1340 t5$=STRING$(4, | ||
+ | 1350 FOR f=1 TO 7: | ||
+ | 1360 FOR f=1 TO 7: | ||
+ | 1370 PRINT TAB(39); | ||
+ | 1380 PRINT FNpo$(x, | ||
+ | 1390 PRINT FNpo$(x, | ||
+ | 1400 PRINT FNpo$(x, | ||
+ | 1410 FOR f=1 TO 6:y=y+2 | ||
+ | 1420 PRINT FNpo$(x, | ||
+ | 1430 PRINT FNpo$(x, | ||
+ | 1440 NEXT | ||
+ | 1450 PRINT FNpo$(x, | ||
+ | 1460 x=19:PRINT FN po$(x, | ||
+ | 1470 RETURN | ||
</ | </ | ||
===== Controles ===== | ===== Controles ===== | ||
- | | + | |
- | | + | |
- | | + | |
- | W = OESTE | + | |
- | L = OBSERVAR | + | |
- | I = INVENTARIO | + | |
- | TOMAR, SALTAR, GOLPEAR, DECIR... | + | |
- | | + | |
===== Carga del programa ===== | ===== Carga del programa ===== | ||
es/connect_four.1656414845.txt.gz · Última modificación: 2022/06/28 14:14 por jevicac