#include<iostream>
#include<conio.h>
#include<windows.h>
using namespace std;
#define MAPSIZEX 10
#define MAPSIZEY 10
char *tile[] = {" ","■", "□", "★","◎","◇"};
int MAP[MAPSIZEY][MAPSIZEX] = {
// 0, 1 ,2 , 3 , 4 , 5 , 6 , 7 , 8 ,9
{1, 1, 1, 1, 1, 1, 1, 1, 1 ,1}, // 0
{1, 0, 0, 1, 0, 0, 1, 1, 0 ,1}, // 1
{1, 0, 0, 1, 0, 0, 1, 0, 0 ,1}, // 2
{1, 0, 0, 1, 0, 0, 1, 0, 1 ,1}, // 3
{1, 0, 0, 1, 0, 0, 1, 0, 0 ,1}, // 4
{1, 0, 0, 0, 0, 0, 0, 0, 0 ,1}, // 5
{1, 1, 0, 0, 0, 0, 0, 0, 0 ,1}, // 6
{1, 0, 0, 1, 1, 1, 1, 0, 0 ,1}, // 7
{1, 0, 0, 0, 0, 0, 1, 0, 0 ,2}, // 8
{1, 1, 1, 1, 1, 1, 1, 1, 1 ,1} // 9
};
void Draw();
void Move();
void main()
{
Draw();
}
void Draw()
{
for(int i = 0; i<MAPSIZEY; i++){
for(int j=0; j<MAPSIZEX; j++){
cout<<tile[MAP[i][j]];
}
cout<< endl;
}
}
출처 : http://blog.naver.com/ree31206?Redirect=Log&logNo=46428192
'C++' 카테고리의 다른 글
C++ Stack(focus + back) (0) | 2013.12.11 |
---|