#include<iostream>

#include<stdio.h>

#include<stdlib.h>

#include<Windows.h>

#include<string>


using namespace std;


string maps[60];

int board_size;


void reset_board(int size);

void draw_board();


int main()

{

    int select = 0;

    while(select != 3)

    {

        cout << " - Map size -" << endl;

        cout << "1. Easy(8*8)" << endl;

        cout << "2. Nomal(13*13)" << endl;

        cout << "3. Hard(19*19)" << endl;

        cout << "4. Exit" << endl;

        cout << ":  " << endl;

        select = getchar() - '1';

        getchar();

        if(select >= 0 && select <= 2)

        {

            const int board_size[] = {8, 13, 19};

            reset_board(board_size[select]);

            draw_board();

        }

    }


    system("pause");

    return 0;

}


void reset_board(int size)    //표값 초기화

{

    board_size = size;

    int y = 0;

    maps[y] = "┏";

    for(int x = 0; x < size - 1; ++x)

    {

        maps[y] += "━┳";

    }

    maps[y++] += "━┓";

    while(y < size * 2 - 1)

    {

        maps[y] = "┃";

        for(int x = 0; x < size - 1; ++x)

        {

            maps[y] += "  ┃";

        }

        maps[y++] += "  ┃";

        maps[y] = "┣";

        for(int x = 0; x < size - 1; ++x)

        {

            maps[y] += "━╋";

        }

        maps[y++] += "━┫";

    }

    maps[y] = "┃";

    for(int x = 0; x < size - 1; ++x)

    {

        maps[y] += "  ┃";

    }

    maps[y++] += "  ┃";

    maps[y] = "┗";

    for(int x = 0; x < size - 1; ++x)

    {

        maps[y] += "━┻";

    }

    maps[y] += "━┛";

}


void draw_board()

{

    system("cls");


    for(int i = 0; i < board_size * 2 + 1; ++i)

    {

        cout << maps[i] << endl;

    }

}


메뉴 선택루프 잘 봐.