0% encontró este documento útil (0 votos)
26 vistas17 páginas

T

Cargado por

Iali
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como TXT, PDF, TXT o lee en línea desde Scribd
0% encontró este documento útil (0 votos)
26 vistas17 páginas

T

Cargado por

Iali
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como TXT, PDF, TXT o lee en línea desde Scribd

procedure MarioBros;

var jugador:array[1..2] of record

dimension,personaje,Vidas,VidasIni,comienza,CasDelante,Estrella,TurnoPerdido:intege
r;
end;
Cespeciales:array[1..2] of record
Efecto:array[1..6] of string;
MatrizOyP:array[1..10,1..10] of string;
Cantidad:integer;
end;

i,j,k,fi,fj,N,Elegido,Filas,inicio,SentidoMatriz,TCasillas,Valor,dificultad,Casilla
Selec,Casignados,Turno,CDados,ValorDado,ProxPos,Aparece,Especial:integer;
ProxPosSpe,CDiagonal,Mayor:integer;
SeleccPer:array[1..7] of string;
MatrizPos:array[1..10,1..10] of integer;
MatrizPer:array[1..10,1..10] of integer;
Diagonal:array[1..10] of integer;

begin
randomize;
CDados:=0;
//Casillas Especiales//
for i:=1 to 2 do
for j:=1 to 6 do
case i of
1:
case j of
1:Cespeciales[i].Efecto[j]:='Avanza2';
2:Cespeciales[i].Efecto[j]:='DelantedelOtro';
3:Cespeciales[i].Efecto[j]:='Dado';
4:Cespeciales[i].Efecto[j]:='Estrella';
5:Cespeciales[i].Efecto[j]:='Diagonal';
6:Cespeciales[i].Efecto[j]:='Vida';
end;
2:
case j of
1:Cespeciales[i].Efecto[j]:='Retro';
2:Cespeciales[i].Efecto[j]:='PierdeTurno';
3:Cespeciales[i].Efecto[j]:='Lava';
4:Cespeciales[i].Efecto[j]:='Veneno';
5:Cespeciales[i].Efecto[j]:='DiagonalSec';
6:Cespeciales[i].Efecto[j]:='RetroN';
end;
end;

//--Personajes--//
for i:=1 to 7 do
case i of
1:SeleccPer[i]:='Mario';
2:SeleccPer[i]:='Luigi';
3:SeleccPer[i]:='Toad';
4:SeleccPer[i]:='Bowser';
5:SeleccPer[i]:='Donkey Kong';
6:SeleccPer[i]:='Goomba';
7:SeleccPer[i]:='Koopa';
end;
Elegido:=0;
for i:=1 to 2 do
begin
writeln('Jugador ',i,', introduzca el personaje con el que desea jugar:');
for j:=1 to 7 do
begin
write(j,'. ');
case j of
1:Textcolor(red);
2:Textcolor(LightGreen);
3:Textcolor(lightred);
4:Textcolor(Yellow);
5:Textcolor(Brown);
6:Textcolor(DarkGray);
7:Textcolor(Blue);
end;
if (j=Elegido) then
Textcolor(Black);
writeln(SeleccPer[j]);
Textcolor(White);
end;
Repeat
readln(jugador[i].personaje);
if (jugador[i].personaje<1) or (jugador[i].personaje>7) then
writeln('Dato Invalido. Introduzca uno de los 7 personajes');
if (jugador[i].personaje=Elegido) then
writeln('Personaje elegido por el jugador 1. Introduzca otro de los 6
personajes disponibles');
until (jugador[i].personaje>=1) and (jugador[i].personaje<=7) and
(jugador[i].personaje<>Elegido);
Elegido:=jugador[i].personaje;
writeln;
end;

//----Creacion del Tablero----//


//Datos de Entrada//
for i:=1 to 2 do
begin
writeln('Jugador ',i,', introduzca la dimension que usted desea del tablero
(entre 5 y 10):');
repeat
readln(jugador[i].dimension);
if (jugador[i].dimension<5) or (jugador[i].dimension>10) then
writeln('Limite superado. Introduzca un dato valido jugador ',i,'.');
until (jugador[i].dimension>=5) and (jugador[i].dimension<=10);
end;writeln;

if jugador[1].dimension>jugador[2].dimension then
N:=jugador[1].dimension
else
N:=jugador[2].dimension;

//Sentido//
writeln('Jugadores, como desean que sea el recorrido del tablero?:');
writeln('1. Horario');
writeln('2. Antihorario');
Repeat
readln(SentidoMatriz);
if (SentidoMatriz<>1) and (SentidoMatriz<>2) then
writeln('Introduzca una opcion valida');
until (SentidoMatriz=1) or (SentidoMatriz=2);writeln;

//Declaracion de Variables//
inicio:=1;
Valor:=1;
TCasillas:=N*N;
Filas:=N;

//Matriz en sentido horario//


if (SentidoMatriz=1) then
Repeat

//izquierda a derecha//
for i:=inicio to N do
begin
MatrizPos[inicio,i]:=Valor;
Valor:=Valor+1;
end;

//arriba a abajo//
if Valor<=TCasillas then
for i:=inicio+1 to N do
begin
MatrizPos[i,N]:=Valor;
Valor:=Valor+1;
end;

//derecha a izquierda//
if Valor<=TCasillas then
for i:=N-1 downto inicio do
begin
MatrizPos[N,i]:=Valor;
Valor:=Valor+1;
end;

//abajo a arriba//
if Valor<=TCasillas then
for i:=N-1 downto inicio+1 do
begin
MatrizPos[i,inicio]:=Valor;
Valor:=Valor+1;
end;

//Se modifican los limites//


inicio:=inicio+1;
N:=N-1;
until Valor>TCasillas;

//Matriz en sentido antihorario//


if (SentidoMatriz=2) then
Repeat

//arriba a abajo//
for i:=inicio to N do
begin
MatrizPos[i,inicio]:=Valor;
Valor:=Valor+1;
end;

//izquierda a derecha//
if Valor<=TCasillas then
for i:=inicio+1 to N do
begin
MatrizPos[N,i]:=Valor;
Valor:=Valor+1;
end;

//abajo a arriba//
if Valor<=TCasillas then
for i:=N-1 downto inicio do
begin
MatrizPos[i,N]:=Valor;
Valor:=Valor+1;
end;

//derecha a izquierda//
if Valor<=TCasillas then
for i:=N-1 downto inicio+1 do
begin
MatrizPos[inicio,i]:=Valor;
Valor:=Valor+1;
end;

//Se modifican los limites//


inicio:=inicio+1;
N:=N-1;
until Valor>TCasillas;

//Declaracion de las matrices restantes//


for i:=1 to 2 do
for j:=1 to Filas do
for k:=1 to Filas do
Cespeciales[i].MatrizOyP[j,k]:='x';
for i:=1 to Filas do
for j:=1 to Filas do
begin
MatrizPer[i,j]:=0;
//Coordenadas de la casilla final//
if MatrizPos[i,j]=TCasillas then
begin
fi:=i;
fj:=j;
end;
end;

//Previsualizacion del Tablero//


writeln('Previsualizacion del Tablero:');
for i:=1 to Filas do
begin
for j:=1 to Filas do
begin
if (MatrizPos[i,j]=1) then
TextBackground(Green);
if (MatrizPos[i,j]=TCasillas) then
TextBackground(Yellow);
write(MatrizPos[i,j]:3,' ');

TextBackground(Black);
end;
writeln;
end;

readkey();
CLRSCR;

//--Vidas--//
for i:=1 to 2 do
begin
writeln('Jugador ',i,' lance el dado para obtener su numero de vidas:');
readkey();
jugador[i].Vidas:=random(6)+1;
jugador[i].VidasIni:=jugador[i].Vidas;
CDados:=CDados+1;
write(jugador[i].Vidas,' Vida');
if (jugador[i].Vidas>1) then
write('s');
writeln;
end;writeln;

//--Dificultad--//
writeln('Escoger dificultad:');
for i:=1 to 3 do
begin
write(i,'. ');
case i of
1:
begin
TextColor(Green);
writeln('Basico');
end;
2:
begin
TextColor(Yellow);
writeln('Medio');
end;
3:
begin
TextColor(Red);
writeln('Avanzado');
end;
end;
Textcolor(White)
end;
Repeat
readln(dificultad);
if (dificultad<1) or (dificultad>3) then
writeln('Dato Invalido. Introduzca una dificultad valida');
until (dificultad>=1) and (dificultad<=3);writeln;

//Cantidad de casillas especiales//


for i:=1 to 2 do
begin
case dificultad of
1:
Cespeciales[i].Cantidad:=trunc(TCasillas*0.2);
2:
Cespeciales[i].Cantidad:=trunc(TCasillas*0.15);
3:
Cespeciales[i].Cantidad:=trunc(TCasillas*0.1);
end;
dificultad:=4-dificultad;
end;

//Asignando las casillas especiales al tablero//


for i:=1 to 2 do
begin
Casignados:=0;
Repeat
CasillaSelec:=random(TCasillas)+1;
if (CasillaSelec<>1) and (CasillaSelec<>TCasillas) then
for j:=1 to Filas do
for k:=1 to Filas do
if (MatrizPos[j,k]=CasillaSelec) and
(Cespeciales[1].MatrizOyP[j,k]='x') and (Cespeciales[2].MatrizOyP[j,k]='x') then
begin

Cespeciales[i].MatrizOyP[j,k]:=Cespeciales[i].Efecto[random(6)+1];
Casignados:=Casignados+1;
end;
until (Casignados=Cespeciales[i].Cantidad);
end;

//Quien comienza?//
writeln('Jugadores lancen los dados para ver quien comienza:');
Repeat
for i:=1 to 2 do
begin
writeln('Jugador ',i,' lanza el dado:');
readkey();
jugador[i].comienza:=random(6)+1;
CDados:=CDados+1;
writeln(jugador[i].comienza);
end;
if (jugador[1].comienza=jugador[2].comienza) then
begin
writeln('Sacaron el mismo numero, lancen de nuevo ambos');writeln;
end;
until (jugador[1].comienza<>jugador[2].comienza);

if (jugador[1].comienza>jugador[2].comienza) then
begin
writeln('El jugador 1 es el que inicia');
Turno:=1;
end
else
begin
writeln('El jugador 2 es el que inicia');
Turno:=2;
end;writeln;

//Previsualizacion del Tablero//


writeln('Previsualizacion del Tablero:');
for i:=1 to Filas do
begin
for j:=1 to Filas do
begin
//Posicion de Casillas Especiales//
if (MatrizPos[i,j]=1) then
TextBackground(Green);
if (MatrizPos[i,j]=TCasillas) then
TextBackground(Yellow);
if (Cespeciales[1].MatrizOyP[i,j]<>'x') then
TextBackground(Cyan);
if (Cespeciales[2].MatrizOyP[i,j]<>'x') then
TextBackground(Magenta);

write(MatrizPos[i,j]:3,' ');

TextBackground(Black);
end;
writeln;
end;

readkey();
Clrscr;
writeln;writeln;
Textcolor(Green);
writeln(' >>>Iniciar Juego<<<');
Textcolor(White);
readkey();
Clrscr;

//----Juego----//
for i:=1 to 2 do
begin
jugador[i].CasDelante:=2;
jugador[i].Estrella:=0;
jugador[i].TurnoPerdido:=0;
end;
Repeat
//--Regreso de los jugadores al tablero--//
Aparece:=0;
for i:=1 to Filas do
for j:=1 to Filas do
if (MatrizPer[i,j]=jugador[Turno].personaje) then
Aparece:=1;
if (Aparece<>1) then
MatrizPer[1,1]:=jugador[Turno].personaje;

//--Interfaz--//
write('Dificultad: ');
case dificultad of
1:
begin
TextColor(Green);
writeln('Basico');
end;
2:
begin
TextColor(Yellow);
writeln('Medio');
end;
3:
begin
TextColor(Red);
writeln('Avanzado');
end;
end;
Textcolor(White);
write('Sentido:');
case SentidoMatriz of
1:writeln(' Horario');
2:writeln(' Antihorario');
end;writeln;
for i:=1 to 2 do
begin
write('Jugador ',i,': ');
case jugador[i].personaje of
1:Textcolor(red);
2:Textcolor(LightGreen);
3:Textcolor(lightred);
4:Textcolor(Yellow);
5:Textcolor(Brown);
6:Textcolor(DarkGray);
7:Textcolor(Blue);
end;
write(SeleccPer[jugador[i].personaje],': ');
if (jugador[i].Vidas>0) then
begin
Textcolor(red);
for j:=1 to jugador[i].Vidas do
write('*');
if (jugador[i].Estrella<>0) then
begin
Textcolor(Yellow);
write(' Estrella (',jugador[i].Estrella,'/3)');
end;
if (jugador[i].TurnoPerdido<>0) then
begin
Textcolor(DarkGray);
write(' Turno perdido (',jugador[i].TurnoPerdido,'/1)');
end;
end
else
begin
Textcolor(White);
write('(muerto)')
end;
writeln;
Textcolor(White);
end;writeln;

//--Matriz--//
for i:=1 to Filas do
begin
for j:=1 to Filas do
begin
//Posicion Personajes//
case MatrizPer[i,j] of
1:Textcolor(red);
2:Textcolor(LightGreen);
3:Textcolor(lightred);
4:Textcolor(Yellow);
5:Textcolor(Brown);
6:Textcolor(DarkGray);
7:Textcolor(Blue);
end;

//Posicion de Casillas Especiales//


if (MatrizPos[i,j]=1) then
TextBackground(Green);
if (MatrizPos[i,j]=TCasillas) then
TextBackground(Yellow);
if (Cespeciales[1].MatrizOyP[i,j]<>'x') then
TextBackground(Cyan);
if (Cespeciales[2].MatrizOyP[i,j]<>'x') then
TextBackground(Magenta);

write(MatrizPos[i,j]:3,' ');

Textcolor(White);
TextBackground(Black);
end;
writeln;
end;writeln;
writeln('--------------------------------');writeln;

if (jugador[Turno].TurnoPerdido<>1) then
begin
//Lanzar dado//
writeln('Turno de ',SeleccPer[jugador[Turno].personaje],' (jugador
',Turno,'), lance el dado:');
readkey();
ValorDado:=random(6)+1;
CDados:=CDados+1;
writeln(ValorDado);writeln;
readkey();

//--Avance de casillas--//
for i:=1 to Filas do
for j:=1 to Filas do
if (MatrizPer[i,j]=jugador[Turno].personaje) then
begin
ProxPos:=MatrizPos[i,j]+ValorDado;
MatrizPer[i,j]:=0;
end;

//--Interaccion con los elementos del tablero--//


Repeat

Especial:=0;

//Si se adelanta del final//


if ProxPos>TCasillas then
ProxPos:=(2*TCasillas)-ProxPos;

for i:=1 to Filas do


for j:=1 to Filas do
if (MatrizPos[i,j]=ProxPos) then
begin
//Mecanica de ocupar casillas//
if (MatrizPer[i,j]=jugador[3-Turno].personaje) and (Especial<>1)
then
begin
jugador[3-Turno].Vidas:=jugador[3-Turno].Vidas-1;
jugador[3-Turno].CasDelante:=2;
writeln('--------------------------------');writeln;
writeln(SeleccPer[jugador[Turno].personaje],' (jugador
',Turno,') ha asesinado a ',SeleccPer[jugador[3-Turno].personaje],' (jugador ',3-
Turno,')');
writeln;
readkey();
end;

//Premios//
if (Cespeciales[1].MatrizOyP[i,j]<>'x') and (Especial<>1) then
begin
writeln('--------------------------------');writeln;
writeln('Has caido en una casilla premiada!');
readkey();
case Cespeciales[1].MatrizOyP[i,j] of

'Avanza2':
begin
writeln('Avanzas 2 casillas desde la posicion donde te
encuentras');
if (ProxPos<>TCasillas-1) then
ProxPosSpe:=ProxPos+2;
Especial:=1;
readkey();
writeln;
end;

'DelantedelOtro':
begin
writeln('Te ubicas en una casilla delante del otro
jugador!');
readkey();
if (ProxPos<jugador[3-Turno].CasDelante) then
begin
ProxPosSpe:=jugador[3-Turno].CasDelante;
writeln('Ahora te ubicaras en la casilla
',ProxPosSpe);
Especial:=1;
end
else
writeln('No tienes a ningun jugador delante, no
avanzas ninguna casilla');
readkey();
writeln;
end;

'Dado':
begin
writeln('Lanza nuevamente el dado!:');
readkey();
ValorDado:=random(6)+1;
writeln(ValorDado);
CDados:=CDados+1;
ProxPosSpe:=ProxPos+ValorDado;
Especial:=1;
readkey();
writeln;
end;

'Estrella':
begin
writeln('Has ganado una estrella, eres inmune en los
proximos 3 turnos a cualquier penalizacion!:');
jugador[Turno].Estrella:=4;
readkey();
end;

'Diagonal':
begin
writeln('Avanza hasta la casilla mas cercana que tienes y
que pertenezca a la diagonal principal!:');
readkey();
CDiagonal:=0;

for k:=1 to Filas do


if (ProxPos<MatrizPos[k,k]) then
begin
CDiagonal:=CDiagonal+1;
Diagonal[CDiagonal]:=MatrizPos[k,k];
end;

if (CDiagonal=0) then
begin
writeln('No hay casillas cercanas pertenecientes a la
diagonal principal');
readkey();
end
else
begin
if Diagonal[1]<Diagonal[CDiagonal] then
ProxPosSpe:=Diagonal[1]
else
ProxPosSpe:=Diagonal[CDiagonal];
writeln('Avanzas hasta la casilla ',ProxPosSpe);
readkey();
Especial:=1;
end;
writeln;
end;

'Vida':
begin
writeln('Has ganado una vida');
jugador[Turno].Vidas:=jugador[Turno].Vidas+1;
readkey();
end;

end;
end;

//Penalizaciones//
if (Cespeciales[2].MatrizOyP[i,j]<>'x') and (Especial<>1) then
begin
writeln('--------------------------------');writeln;
writeln('Has caido en una casilla penalizada!');
readkey();
if (jugador[Turno].Estrella=0) then
case Cespeciales[2].MatrizOyP[i,j] of

'Retro':
begin
writeln('Retrocede 1 casilla desde la posicion donde
te encuentras');
ProxPosSpe:=ProxPos-1;
Especial:=1;
readkey();
writeln;
end;

'PierdeTurno':
begin
writeln('Pierdes un turno');
jugador[Turno].TurnoPerdido:=2;
readkey();
end;

'Lava':
begin
writeln('Has caido en lava. Pierdes 2 vidas');
jugador[Turno].Vidas:=jugador[Turno].Vidas-2;
readkey();
end;

'Veneno':
begin
writeln('Has caido en aguas venenosas. Pierdes 1
vida.');
jugador[Turno].Vidas:=jugador[Turno].Vidas-1;
readkey();
end;

'DiagonalSec':
begin
writeln('Retrocede hasta la casilla mas cercana que
tienes y que pertenezca a la diagonal secundaria!:');
readkey();
CDiagonal:=0;
Mayor:=0;

for k:=1 to Filas do


if (ProxPos>MatrizPos[k,Filas+1-k]) then
begin
CDiagonal:=CDiagonal+1;
Diagonal[CDiagonal]:=MatrizPos[k,Filas+1-k];
end;

if (CDiagonal=0) then
begin
writeln('No hay casillas cercanas pertenecientes a
la diagonal secundaria');
readkey();
end
else
begin
for k:=1 to CDiagonal do
if Diagonal[k]>Mayor then
Mayor:=Diagonal[k];
ProxPosSpe:=Mayor;
writeln('Retrocedes hasta la casilla
',ProxPosSpe);
Especial:=1;
readkey();
end;
writeln;
end;

'RetroN':
begin
writeln('Retrocede segun el dado!:');
readkey();
ValorDado:=random(6)+1;
writeln(ValorDado);
CDados:=CDados+1;
ProxPosSpe:=ProxPos-ValorDado;
Especial:=1;
readkey();
writeln;
end;
end
else
begin
writeln('Sin embargo, cuentas con una estrella, asi que no
te hara efecto');
readkey();
end;
end;

if (Especial<>1) and (jugador[Turno].Vidas>0) then


MatrizPer[i,j]:=jugador[Turno].personaje;

end;
ProxPos:=ProxPosSpe;
until (Especial<>1);
end
else
begin
writeln(SeleccPer[jugador[Turno].personaje],' (jugador ',Turno,') tu turno
no se encuentra disponible');
readkey();
end;

jugador[Turno].CasDelante:=ProxPos+1;
if (jugador[Turno].Estrella<>0) then
jugador[Turno].Estrella:=jugador[Turno].Estrella-1;
if (jugador[Turno].TurnoPerdido<>0) then
jugador[Turno].TurnoPerdido:=jugador[Turno].TurnoPerdido-1;
if (jugador[3-Turno].Vidas>0) then
Turno:=3-Turno;
writeln;
//--ODS--//
case random(17)+1 of
1:
begin
Textcolor(Red);
writeln('[Link] DE LA POBREZA:');
writeln('Poner fin a la pobreza, enfocarse en los mas vulnerables,
aumentar el acceso a los recursos y servicios basicos y apoyar a las comunidades
afectadas por conflictos y desastres relacionados con el clima.');
end;
2:
begin
Textcolor(Yellow);
writeln('[Link] CERO:');
writeln('Poner fin al hambre, promover practicas agricolas sostenibles y
fomentar la cooperacion internacional para asegurar la inversion en la mejora de la
productividad agricola.');
end;
3:
begin
Textcolor(Green);
writeln('[Link] Y BIENESTAR:');
writeln('Asegurar la buena salud, abordar las desigualdades dentro y
fuera de los paises en temas de salud, y luchar continuamente contra el VIH y otras
enfermedades infecciosas.');
end;
4:
begin
Textcolor(Red);
writeln('[Link] DE CALIDAD:');
writeln('Asegurar que todas los ninos completen su educacion primaria y
secundaria gratuita, lograr el acceso universal a educacion superior de calidad,
proporcionar acceso igualitario a formacion tecnica asequible y eliminar las
disparidades de genero e ingresos');
end;
5:
begin
Textcolor(Brown);
writeln('[Link] DE GENERO:');
writeln('Garantizar el acceso universal a salud reproductiva y sexual, y
otorgar a la mujer derechos igualitarios en el acceso a recursos economicos');
end;
6:
begin
Textcolor(Cyan);
writeln('[Link] LIMPIA Y SANEAMIENTO:');
writeln('Garantizar el acceso universal al agua potable segura y
asequible, proporcionar instalaciones sanitarias y fomentar practicas de higiene');
end;
7:
begin
Textcolor(Yellow);
writeln('[Link] ASEQUIBLE Y NO CONTAMINANTE:');
writeln('Invertir en fuentes de energia limpia y mejorar la productividad
energetica');
end;
8:
begin
Textcolor(LightRed);
writeln('[Link] DECENTE Y CRECIMIENTO ECONOMICO:');
writeln('Estimular el crecimiento economico sostenible, fomentar
politicas que estimulen el espiritu empresarial y la creacion de empleo, y
erradicar el trabajo forzoso, la esclavitud y el trafico humano.');
end;
9:
begin
Textcolor(Brown);
writeln('[Link], INNOVACION E INFRAESTRUCTURA:');
writeln('Garantizar el acceso igualitario a la informacion y el
conocimiento, y promover la innovacion y el emprendimiento.');
end;
10:
begin
Textcolor(LightMagenta);
writeln('[Link] DE LAS DESIGUALDADES:');
writeln('Promover la inclusion economica de todos y todas,
independientemente de su genero, raza o etnia.');
end;
11:
begin
Textcolor(Yellow);
writeln('[Link] Y COMUNIDADES SOSTENIBLES:');
writeln('Garantizar el acceso a viviendas seguras y asequibles y el
mejoramiento de los asentamientos marginales.');
end;
12:
begin
Textcolor(Brown);
writeln('[Link] Y CONSUMO RESPONSABLES:');
writeln('Apoyar a los paises en desarrollo a avanzar hacia patrones
sostenibles de consumo y reducir a la mitad el desperdicio per capita de alimentos
en el mundo a nivel de comercio minorista.');
end;
13:
begin
Textcolor(Green);
writeln('[Link] POR EL CLIMA:');
writeln('Abordar las necesidades de los paises en desarrollo en cuanto a
adaptacion al cambio climatico e inversion en el desarrollo bajo en carbono.');
end;
14:
begin
Textcolor(Cyan);
writeln('[Link] SUBMARINA:');
writeln('Mejorar la conservacion y el uso sostenible de los recursos
oceanicos a traves del derecho internacional.');
end;
15:
begin
Textcolor(LightGreen);
writeln('[Link] DE ECOSISTEMAS TERRESTRES:');
writeln('Tomar medidas urgentes para reducir la perdida de habitats
naturales y biodiversidad que forman parte de nuestro patrimonio comun y apoyar la
seguridad alimentaria y del agua a nivel mundial, la mitigacion y adaptacion al
cambio climatico, la paz y la seguridad.');
end;
16:
begin
Textcolor(LightBlue);
writeln('[Link], JUSTICIA E INSTITUCIONES SOLIDAS:');
writeln('Reducir sustancialmente todas las formas de violencia, y
trabajar con los gobiernos y las comunidades para encontrar soluciones duraderas a
los conflictos e inseguridad.');
end;
17:
begin
Textcolor(Blue);
writeln('[Link] PARA LOGRAR LOS OBJETIVOS:');
writeln('Mejorar la cooperacion Norte-Sur y Sur-Sur, apoyando los planes
nacionales en el cumplimiento de todas las metas, promover el comercio
internacional y ayudar a los paises en desarrollo para que aumenten sus
exportaciones.');
end;
end;

Textcolor(white);
readkey();
Clrscr;
until (MatrizPer[fi,fj]<>0) or ((jugador[1].Vidas<=0) and
(jugador[2].Vidas<=0));

if (jugador[1].Vidas<=0) and (jugador[2].Vidas<=0) then


writeln('Ninguno de los jugadores pudo alcanzar a la Princesa Peach. Ambos han
muerto.')
else
if (MatrizPer[fi,fj]=jugador[1].personaje) then
begin
write('FELICIDADES! ');
case jugador[1].personaje of
1:Textcolor(red);
2:Textcolor(LightGreen);
3:Textcolor(lightred);
4:Textcolor(Yellow);
5:Textcolor(Brown);
6:Textcolor(DarkGray);
7:Textcolor(Blue);
end;
write(SeleccPer[jugador[1].personaje],' (Jugador 1)');
Textcolor(White);
writeln(' se nombra el vencedor y ha llegado hasta la Princesa Peach!');
end;
if (MatrizPer[fi,fj]=jugador[2].personaje) then
begin
write('FELICIDADES! ');
case jugador[2].personaje of
1:Textcolor(red);
2:Textcolor(LightGreen);
3:Textcolor(lightred);
4:Textcolor(Yellow);
5:Textcolor(Brown);
6:Textcolor(DarkGray);
7:Textcolor(Blue);
end;
write(SeleccPer[jugador[2].personaje],' (Jugador 2)');
Textcolor(White);
writeln(' se nombra el vencedor y ha llegado hasta la Princesa Peach!');
end;

readkey();
clrscr;
end;

También podría gustarte