You are on page 1of 17

#include "stdafx.

h"
#include "conio.h"
#include "stdio.h"
#include "iostream"
#include "windows.h"
#include "stdlib.h"
#include "MMSystem.h"
using namespace System;
using namespace std;
#define derecha 77
#define izquierda 75
#define arriba 72
#define abajo 80
#define FILAS 40
#define COLUMNAS 60
int mapas[FILAS][COLUMNAS],v,x,y,filas,columnas,tecla,direccion=0;

int mapa1[FILAS][COLUMNAS] = {
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,100},/*5*/
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
};
int mapa2[FILAS][COLUMNAS] = {

{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,
1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
};
int mapa3[FILAS][COLUMNAS] = {
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,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,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
};

int mapa4[FILAS][COLUMNAS] = {
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0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0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},

};
int mapa5[FILAS][COLUMNAS] = {
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100},
{100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,10
0},
};
void matriz()
{
for(int fil=0;fil<FILAS;fil++)
{
for(int col=0;col<COLUMNAS;col++)
{
if(v==1)mapas[fil][col]=mapa1[fil][col];
if(v==2)mapas[fil][col]=mapa2[fil][col];
if(v==3)mapas[fil][col]=mapa3[fil][col];
if(v==4)mapas[fil][col]=mapa4[fil][col];
if(v==5)mapas[fil][col]=mapa5[fil][col];
Console::SetCursorPosition(col,fil); //x=columna,y=fila
if(mapas[fil][col] == 1)
{
Console::ForegroundColor=ConsoleColor::Gray;
printf("%c",219);
}
if(mapas[fil][col] == 0)
{
Console::ForegroundColor=ConsoleColor::Black;
printf("%c",0);
}
/*if(mapas[fil][col] == 3)
{
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
}*/

if(mapas[fil][col] == 4)
{
Console::ForegroundColor=ConsoleColor::Red;
printf("%c",178);
}
if(mapas[fil][col] == 5)
{
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",187);
}
if(mapas[fil][col] == 6)
{
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",186);
}
if(mapas[fil][col] == 7)
{
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",188);
}
if(mapas[fil][col] == 8)
{
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",201);
}
if(mapas[fil][col] == 9)
{
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",200);
}
if(mapas[fil][col] == 2)
{
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",205);
}
}
}
}
void ocultarcursor(){
HANDLE hCon;
hCon= GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO cci;
cci.dwSize = 2;
cci.bVisible = false;
SetConsoleCursorInfo(hCon,&cci);
}

void entrada()
{
Console::ForegroundColor=ConsoleColor::White;
Console::SetCursorPosition(1,1);
printf("\n ######## ####### ### ######## ");
printf("\n ## ## ## ## ## ## ## ##");
printf("\n ## ## ## ## ## ## ## ##");
printf("\n ######## ## ## ## ## ## ##");
printf("\n ## ## ## ## ######### ## ##");
printf("\n ## ## ## ## ## ## ## ##");
printf("\n ## ## ####### ## ## ######## \n\n");
printf("\n ######## ## ####### ###### ## ## ###### ");
printf("\n ## ## ## ## ## ## ## ## ## ## ##");
printf("\n ## ## ## ## ## ## ## ## ## ");
printf("\n ######## ## ## ## ## ##### ###### ");
printf("\n ## ## ## ## ## ## ## ## ##");
printf("\n ## ## ## ## ## ## ## ## ## ## ##");
printf("\n ######## ######## ####### ###### ## ## ###### ");

while(!_kbhit())
{
Console::SetCursorPosition(15,25);
printf("Presione una tecla para continuar");
Sleep(350);
Console::SetCursorPosition(15,25);
printf(" ");
Sleep(150);
}
system("cls");
}

void mono()
{
if(_kbhit())
{
tecla=_getch();
Console::SetCursorPosition(columnas,filas);
if(tecla==derecha && mapas[y][x+1]== 0 && mapas[y][x+1]!=4)
{
while(mapas[y][x+1]==0 && mapas[y][x+1]!=4 && mapas[y][x
+1]!=100)
{
Console::SetCursorPosition(x++,y);
printf(" ");
Console::SetCursorPosition(x,y);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
Sleep(30);
}
}
if(tecla==izquierda && mapas[y][x-1]==0 && mapas[y][x-1]!=4)
{
while(mapas[y][x-1]==0 && mapas[y][x-1]!=4 && mapas[y][x
-1]!=100)
{
Console::SetCursorPosition(x--,y);
printf(" ");
Console::SetCursorPosition(x,y);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
Sleep(30);
}
}
if(tecla==arriba && mapas[y-1][x]==0 && mapas[y-1][x]!=4)
{
while(mapas[y-1][x]==0 && mapas[y-1][x]!=4 && mapas[y-1]
[x]!=100)
{
Console::SetCursorPosition(x,y--);
printf(" ");
Console::SetCursorPosition(x,y);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
Sleep(30);
}
}
if(tecla==abajo && mapas[y+1][x]==0 && mapas[y+1][x]!=2 && mapas
[y+1][x]!=100)
{
while(mapas[y+1][x]==0 && mapas[y+1][x]!=4 && mapas[y+1]
[x]!=100)
{
Console::SetCursorPosition(x,y++);
printf(" ");
Console::SetCursorPosition(x,y);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
Sleep(30);
}
}
}
}
int main(array<System::String ^> ^args)
{
ocultarcursor();
Console::SetWindowSize(60,40);
entrada();

while(mapas[y][x+1]!=4)
{
/*
v=1;
PlaySound(TEXT("danganronpa.wav"), NULL, SND_LOOP | SND_ASYNC);
matriz();
_flushall();
Console::SetCursorPosition(x=45,y=28);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
while(mapas[y][x+1]!=4&&mapas[y][x+1]!=100&&mapas[y][x-1]!=100&&
mapas[y-1][x]!=100&&mapas[y+1][x]!=100)
{
mono();
}
system("cls");
}
mapas[y][x+1]=0;
v=2;
while(mapas[y][x+1]!=4)
{
matriz();
Console::SetCursorPosition(x=16,y=32);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
while(mapas[y][x+1]!=4&&mapas[y][x+1]!=100&&mapas[y][x-1]!=100&&
mapas[y-1][x]!=100&&mapas[y+1][x]!=100)
{
mono();
}
system("cls");
}
mapas[y][x+1]=0;

v=3;
while(mapas[y][x+1]!=4)
{
matriz();
Console::SetCursorPosition(x=6,y=5);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
while(mapas[y][x+1]!=4&&mapas[y][x+1]!=100&&mapas[y][x-1]!=100&&
mapas[y-1][x]!=100&&mapas[y+1][x]!=100)
{
mono();
}
system("cls");
}
mapas[y][x+1]=0;
v=4;
while(mapas[y][x+1]!=4)
{
matriz();
Console::SetCursorPosition(x=9,y=33);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);
while(mapas[y][x+1]!=4&&mapas[y][x+1]!=100&&mapas[y][x-1]!=100&&
mapas[y-1][x]!=100&&mapas[y+1][x]!=100)
{
mono();
}
system("cls");
}
mapas[y][x+1]=0;
*/
v=5;
while(mapas[y][x+1]!=4)
{
PlaySound(TEXT("Castillo_Mario.wav"), NULL, SND_LOOP | SND_ASYNC
);
matriz();
Console::SetCursorPosition(x=27,y=10);
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",178);
Console::SetCursorPosition(x=6,y=27);
printf(" ");
Console::SetCursorPosition(x=48,y=17);
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",178);
Console::SetCursorPosition(x=6,y=28);
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",178);
Console::SetCursorPosition(x=27,y=33);
Console::ForegroundColor=ConsoleColor::Green;
printf("%c",178);
Console::SetCursorPosition(x=11,y=5);
Console::ForegroundColor=ConsoleColor::Blue;
printf("%c",219);

while(mapas[y][x+1]!=4&&mapas[y][x+1]!=100&&mapas[y][x-1]!=100&&
mapas[y-1][x]!=100&&mapas[y+1][x]!=100)
{
mono();
if (x==27 && y==33)
{
Console::SetCursorPosition(x=48,y=17);
tecla==abajo;
x=48;
y=17;
}
if (x==6 && y==28)
{
Console::SetCursorPosition(x=27,y=10);
tecla==abajo;
x=27;
y=10;
}

}
system("cls");
}

_getch();
return 0;
}
}

You might also like