Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
3.4 kB
0
Indexable
Never
#include<iostream>
#include<conio.h>
using namespace std;

void MainMenu(char X[][80],char &input)
{
	int r, c;
	r = 0;
	c = 0;
	for (r = 0; r < 24; r++)
	{
		for (c = 0; c < 80; c++)
		{
			X[r][c] = ' ';
		}
	}
	r = 0;
	for (c = 1; c < 78; c++)
	{
		X[r][c] = 205;
	}
	r = 23;
	for (c = 1; c < 78; c++)
	{
		X[r][c] = 205;
	}
	r = 1;
	c = 0;
	for (r = 1; r < 23; r++)
	{
		X[r][c] = 186;
	}
	r = 1;
	c = 78;
	for (r = 1; r < 23; r++)
	{
		X[r][c] = 186;
	}
	X[23][78] = 188;
	X[0][0] = 201;
	X[23][0] = 200;
	X[0][78] = 187;

	//T

	X[3][20] = 205;
	X[3][21] = 205;
	X[3][22] = 203;
	X[3][23] = 205;
	X[3][24] = 205;
	X[4][22] = 186;
	X[5][22] = 186;
	X[6][22] = 186;
	X[7][22] = 186;
	
	//I

	X[3][26] = 205;
	X[3][27] = 205;
	X[3][28] = 203;
	X[3][29] = 205;
	X[3][30] = 205;
	X[4][28] = 186;
	X[5][28] = 186;
	X[6][28] = 186;
	X[7][28] = 202;
	X[7][26] = 205;
	X[7][27] = 205;
	X[7][29] = 205;
	X[7][30] = 205;

	//T

	X[3][32] = 205;
	X[3][33] = 205;
	X[3][34] = 203;
	X[3][35] = 205;
	X[3][36] = 205;
	X[4][34] = 186;
	X[5][34] = 186;
	X[6][34] = 186;
	X[7][34] = 186;

	//L

	X[3][38] = 186;
	X[4][38] = 186;
	X[5][38] = 186;
	X[6][38] = 186;
	X[7][38] = 200;
	X[7][39] = 205;
	X[7][40] = 205;
	X[7][41] = 205;

	//E

	X[3][44] = 201;
	X[3][45] = 205;
	X[3][46] = 205;
	X[3][47] = 205;
	X[4][44] = 186;
	X[5][44] = 204;
	X[5][45] = 205;
	X[5][46] = 205;
	X[5][47] = 205;
	
	X[6][44] = 186;
	X[7][44] = 200;
	X[7][45] = 205;
	X[7][46] = 205;
	X[7][47] = 205;
	int c1 = 21;
	int c2 = 46;
	for (c = c1; c <= 46; c++)
	{
		X[10][c] = 205;
	}
	c1 = 21;
	c2 = 46;
	for (c = c1; c <= 46; c++)
	{
		X[16][c] = 205;
	}

	X[10][20] = 201;
	X[10][47] = 187;
	X[16][20] = 200;
	X[16][47] = 188;

	c1 = 20;
	c2 = 47;
	r = 11;

	for (r = r; r < 16; r++)
	{
		X[r][c1] = 186;
	}

	for (r = 11; r < 16; r++)
	{
		X[r][c2] = 186;
	}
	X[13][26] = 'P';
	X[13][27] = 'R';
	X[13][28] = 'E';
	X[13][29] = 'S';
	X[13][30] = 'S';
	X[13][32] = 'X';
	X[13][34] = 'T';
	X[13][35] = 'O';
	X[13][37] = 'S';
	X[13][38] = 'T';
	X[13][39] = 'A';
	X[13][40] = 'R';
	X[13][41] = 'T';

	for (r = 0; r < 24; r++)
	{
		for (c = 0; c < 80; c++)
		{
			cout << X[r][c];
		}
		cout << endl;
	}
	cin >> input;
}

void CoutBoard(char Y[][80])
{
	system("cls");
	for (int i = 0; i < 24; i++)
	{
		for (int j = 0; j < 80; j++)
		{
			Y[i][j] = ' ';
		}
	}

	int rhead, chead, rhand1, chand1, rhand2, chand2, rbody, cbody, rleg1, cleg1, rleg2, cleg2;
	rhead = 20;
	chead = 6;
	rhand1 = 21;
	chand1 = 5;
	rhand2 = 21;
	chand2 = 7;
	rbody = 21;
	cbody = 6;
	rleg1 = 22;
	cleg1 = 5;
	rleg2 = 22;
	cleg2 = 7;
	Y[rhead][chead] = 'O';
	Y[rhand1][chand1] = '/';
	Y[rhand2][chand2] = 92;
	Y[rbody][cbody] = 179;
	Y[rleg1][cleg1] = '/';
	Y[rleg2][cleg2] = 92;

	int r = 23, c = 0;
	for (c = 0; c < 80; c++)
	{
		Y[r][c] = '~';
	}
	int rplatform = 20, cplatform = 10;

	for (int i = 0; i < 10; i++)
	{
		Y[rplatform][cplatform] = '~';
		cplatform++;
	}

	for (int i = 0; i < 24; i++)
	{
		for (int j = 0; j < 80; j++)
		{
			cout << Y[i][j];
		}
		cout << endl;
	}
}

void main()
{
	char X[24][80],Y[24][80], input;
	MainMenu(X,input);
	if (input == 'X'||input=='x')
	{
		CoutBoard(X);
	}
}
Leave a Comment