Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include"Header.h"
void loadingmaker()
{
cout << "Loading";
Sleep(750);
cout << ".";
Sleep(750);
cout << ".";
Sleep(750);
cout << "." << endl;
}
string welcometext(int x)
{
string ab;
ab = "Welcome to Anoroc City Builder ! You have been appointed as the mayor of the city. Let us start by building our city's Townhall\nTownhall is your workspace from where you govern the city . It is also a place that stores the current statistics of your city and its citizens\n\nYou currently hold 5000000 in your Treasury ., make good decisions to keep the City Happiness meter above 20%";
return ab;
}
void Tutorials(int num)
{
static HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_INTENSITY);
string Roadbrief, ApartmentBrief, CharacterBrief;
bool Townhall_NotBuilt = true;
while (Townhall_NotBuilt)
{
string x;
cout << "-Enter townhall to build your townhall free of cost" << endl;
cin >> x;
if (x == "townhall")
{
loadingmaker();
system("cls");
cout << "Select your preferred location for the townhall with the options !" << endl;
/*Draw();*/
cout << "-Congratulations ! You have successfully build a Townhall." << endl;
SetConsoleTextAttribute(h, FOREGROUND_GREEN | FOREGROUND_INTENSITY);
cout << "--Remember that your Citizens give you 20% tax for the services they use and income they earn per month." << endl;
Townhall_NotBuilt = false;
}
else
{
cout << "Oh Chief ! Invalid input." << endl;
}
}
}
void CityBuilder()
{
bool l;
int j, k;
int w;
SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_INTENSITY);
cout.width(120);
cout << "WELCOME TO THE CONSTRUCTION MENU" << endl;
SetConsoleTextAttribute(h, FOREGROUND_GREEN);
cout << City_costs << endl;
Draw();
}
void keypress()
{
bool played3 = PlaySound(TEXT("keyboardpress.wav"), NULL, SND_SYNC);
}
void GameCommandEngine()
{
char ch;
bool gamenotover;
gamenotover = finance(sum);
while (gamenotover)
{
system("cls");
cout << "\nWelcome back to the command line\n-Press 1 To view map .\n-Press 2 To view City statistics \n-Press 3 To go to construction menu\n-Press 4 To clear screen \n-Press 5 for management tab "<< endl;
ch = _getch();
switch (ch)
{
case KEY_1:
Draw();
system("cls");
break;
case KEY_2:
system("cls");
cout.width(120);
cout << "Welcome to the stats Menu" << endl;
cout << "Your city has " << sum << " in the treasury" << endl;
cout << "The Hapiness Meter is currently at 78%" << endl;
break;
case KEY_3:
loadingmaker();
system("cls");
CityBuilder();
break;
case KEY_4:
system("cls");
if (gamenotover == false)
cout << "Oops ! Your city went bankrupt ! Thanks for playing ." << endl;
exit(0);
system("cls");
case KEY_5:
system("cls");
cout << "Welcome To The Management Tab" << endl; /*Coding for next Week -Week 6*/
}
_getch();
}
}