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
|
#include <basicP.h>
using namespace std;
char h;
char in;
int inpt;
int x = 0;
int y = 0;
int locx = 1;
int locy = 1;
int locz = 1;
char Level[31][50][50]={
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
"101010101010101010101010101010",
};
void move(){
in = GetKeystroke();
inpt = in - '0';
switch(inpt){
case -3:
locz --;
break;
case -5:
locz ++;
break;
case 8:
locy --;
break;
case 2:
locy ++;
break;
case 4:
locx --;
break;
case 6:
locx ++;
break;
case 0:
return;
break;
}
}
int main(){
do{
ScreenSize(32, 33);
ClearScreen();
//cout << locx << ", " << locy << ", " << locz << endl;
ArrayOut(true, 'Q', 30, 30, locx, locy, locz, Level);
//move();
}
while(inpt != 0);
return 0;
}
|