Permalink
Cannot retrieve contributors at this time
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?
public-group-term-2/main .cpp.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
39 lines (33 sloc)
1.46 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <random> | |
#include <ctime> | |
// included for the random generator part of our code which will be explained more later | |
#include "Dark_Ages.h" | |
//we included a .h file with code for seperate parts more explained later | |
using namespace std; | |
//shortcut for when we want to do the 'print' statement equivalent onto the terminal | |
int main() | |
{ | |
int Army=50; | |
int Popularity=50; | |
int Religion=50; | |
int Wealth=50; | |
cout<<"Welcome to The Dark Ages. You've been born as a King, name your King"<<endl; | |
string playername; | |
cin>> playername; | |
//the player chooses their name to be used later when they die perhaps or if new mehcanics or scenrios are added | |
//to the game which has to print the kings name. | |
cout<<"these are your beginning stats"<<endl; | |
cout<<"Army: "<<Army<<" Popularity: "<<Popularity<< " Religion: "<<Religion<<" Wealth: "<<Wealth<<endl; | |
//shows the beginning stats to the player after we allocated those bumbers above. | |
while(Army>0 && Army<100,Popularity>0 && Popularity<100,Religion>0 && Religion<100,Wealth >0 && Wealth<100) | |
{ | |
random_s(); | |
continue; | |
} | |
//while loop made to repeat as long as categories are within the 'livable' stats | |
//it will exit loop after saying game over etc, and then end the running code. | |
return 0; | |
//return 0 so the main function works correctly. | |
} |