#include
#include
#include
#include
Void ABC (int x, int y, int see {
COORD coord1;
Coord1. * X X=2;
Coord1. Y=Y;
SetConsoleCursorPosition (GetStdHandle (STD_OUTPUT_HANDLE), coord1);
SetConsoleTextAttribute (GetStdHandle (STD_OUTPUT_HANDLE), see colour;
Printf (" ");
}
Void main () {
Int I, j;
For (I=0; I & lt; 20; I++) {
For (j=0; J & lt; 20; J++) {
If (I==0 | | I==19 | | j==0 | | j==19) {
ABC (I, j, 128);
}
}
}
Srand ((unsigned) time (0));
Int _x1, _y1;
18 + _x1=rand () % 1;
18 + _y1=rand () % 1;
ABC (_x1, _y1, 224);
Int _x _y;
_y=11;
_x=11;
ABC (_x _y, 208);
If (_kbhit ())
The switch (_getch ()) {
Case 'w' : ABC (_x, _y - 1, 208); break;
/* case 's' :
Case 'a' :
Case 's' : */
}
getchar();
}