1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
|
int main(){
menu();
return 0;
}
int menu(){
int menu1;
char menu2;
ClearScreen();
cout << "1.Play Game\n2.Guide\n3.Exit\n";
cin >> menu1;
switch (menu1){
case 1:
v11613();
break;
case 2:
cout << "This is an ASCII game, controlled with the muber pad.\n To move up press 8, to go down press right.\n The left and right movements are controlled by the 4 and 6 keys respectivly.\n";
cout << "\nThis is my first game, so please excuse the bugs that might be in it.\n I will be working on the code continuesly, so ask me or check on line for an update occasionally.\n thank you for playing my game!!\n";
cout << "\n for updates please check pogopogouk.blogspot.com";
cout << "\nPress the any key to continue\n";
cin >> menu2;
menu();
break;
case 3:
return 0;
};
}
int v13313(){
ClearScreen();
cout << "PPPPP__________________________Q\nPPPPPP_____________/ \__________\nPPPP_______________|b|__________\nPPPPP_______~~~~~_______________\nPPP________~~~~~~~______________\nPPP_______~~~~~~~~~_____________\nP__________~~~~~~~______/ \_____\nP___________~~~~~_______|a|_____\n________________________________\n____/ \_________________________\n____|c|_________________________\n________________________________\n________________________________";
cin >> inpt;
if (inpt == "e" || inpt == "E") {
cout << "Are you sure you want to exit?\ny/n";
cin >> inpt;
if (inpt == "y" || inpt == "Y")
return 0;}
else{
input = ((int)inpt);
switch (input){
case 4:
v13213();
break;
case 6:
v13313a();
break;
default:
v13313();
break;
};
}
}
void v13313a(){
ClearScreen();
cout << "PPPPP__________________________Q\nPPPPPP_____________/ \__________\nPPPP_______________|b|__________\nPPPPP_______~~~~~_______________\nPPP________~~~~~~~______________\nPPP_______~~~~~~~~~_____________\nP__________~~~~~~~______/ \_____\nP___________~~~~~_______|a|_____\n________________________________\n____/ \_________________________\n____|c|_________________________\n________________________________\n________________________________";
cout << "sorry, that areas not available, i'm probably workig on it now.";
cin >> inpt;
if (inptkkjggnklfuklugspw21)
switch (input){
case 4:
v13213();
break;
case 6:
v13313a();
break;
default:
v13313();
break;
};
}
void v13213(){
ClearScreen();
cout << "PPPPP_________________________Q_\nPPPPPP_____________/ \__________\nPPPP_______________|b|__________\nPPPPP_______~~~~~_______________\nPPP________~~~~~~~______________\nPPP_______~~~~~~~~~_____________\nP__________~~~~~~~______/ \_____\nP___________~~~~~_______|a|_____\n________________________________\n____/ \_________________________\n____|c|_________________________\n________________________________\n________________________________";
cin >> inpt;
switch (input){
case 4:
v13113();
break;
case 6:
v13313();
break;
default:
v13213();
break;
};
}
void ClearScreen()
{
HANDLE hStdOut;
CONSOLE_SCREEN_BUFFER_INFO csbi;
DWORD count;
DWORD cellCount;
COORD homeCoords = { 0, 0 };
hStdOut = GetStdHandle( STD_OUTPUT_HANDLE );
if (hStdOut == INVALID_HANDLE_VALUE) return;
/* Get the number of cells in the current buffer */
if (!GetConsoleScreenBufferInfo( hStdOut, &csbi )) return;
cellCount = csbi.dwSize.X *csbi.dwSize.Y;
/* Fill the entire buffer with spaces */
if (!FillConsoleOutputCharacter(
hStdOut,
(TCHAR) ' ',
cellCount,
homeCoords,
&count
)) return;
/* Fill the entire buffer with the current colors and attributes */
if (!FillConsoleOutputAttribute(
hStdOut,
csbi.wAttributes,
cellCount,
homeCoords,
&count
)) return;
/* Move the cursor home */
SetConsoleCursorPosition( hStdOut, homeCoords );
}
|