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
|
#include <iostream>
#include <windows.h>
#define VK_UP 0x57
#define VK_DOWN 0x53
#define VK_LEFT 0x41
#define VK_RIGHT 0x44
using namespace std;
int W;
int A;
int S;
int D;
int X = 0;
int Y = 0;
char character = 'O';
int main()
{
char map[10][10] = {{0,1,2,3,4,5,6,7,8,9}, {10,11,12,13,14,15,16,17,18,19}};
W = GetAsyncKeyState(0x57);
for (X = 0; X < 10; X++){
for(Y = 0; Y < 10; Y++){
cout << map[X][Y] << endl;
}
cout << endl; // ends the line
}
}
|