int gameOn(){
#define UP 72
#define LEFT 75
#define RIGHT 77
#define DOWN 80
system("CLS");
int tileOneX = 1;
int tileOneY = 1;
int tileTwoX = 2;
int tileTwoY = 1;
int tileThreeX = 3;
int tileThreeY = 1;
int tileFourX = 4;
int tileFourY = 1;
int tileFiveX = 1;
int tileFiveY = 2;
int tileSixX = 2;
int tileSixY = 2;
int tileSevenX = 3;
int tileSevenY = 2;
int tileEightX = 4;
int tileEightY = 2;
int tileNineX = 1;
int tileNineY = 3;
int tileTenX = 2;
int tileTenY = 3;
int tileElevenX = 3;
int tileElevenY = 3;
int tileTwelveX = 4;
int tileTwelveY = 3;
int tileThirteenX = 1;
int tileThirteenY = 4;
int tileFourteenX = 2;
int tileFourteenY = 4;
int tileFifteenX = 3;
int tileFifteenY = 4;
int tileSixteenX = 4;
int tileSixteenY = 4;
int playerX = 1;
int playerY = 1;
int keys = _getch();
switch(keys)
{
case UP:
{
cout<<"Hello World";
}
case LEFT:
{
}
case RIGHT:
{
}
case DOWN:
{
}
}
system("PAUSE");
return 0;
}
int gameOff(){
system("PAUSE");
return 0;
}
int main(int argc, char** argv) {
int choice;
cout<<"-------------------------------------\n";
cout<<"Welcome to the game of the enemy tile\n";
cout<<"-------------------------------------\n\n\n";
cout<<"[1] - Play\n\n\n";
cout<<"[2] - Exit\n\n\n";
cout<<"Enter here:";
cin>> choice;
if (choice == 1){
gameOn();
}
if(choice == 2){
gameOff();
}
system("PAUSE");
return 0;
}
When I press the up key it will not display anything. Suggestions