Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Game is made by Erzis
- //All rights reserved
- #include <iostream>
- #include <Windows.h>
- #include <string>
- using namespace std;
- int main()
- {
- int kod, wybor_1, wybor_2, wybor_3;
- int menu_back;
- string imie;
- int ludnosc = 5;
- int domki = 2;
- int gold = 15;
- cout << "Prosze wprowadzic CD-KEYA: ";
- cin >> kod;
- if (kod == 1923)
- {
- cout << endl;
- cout << "Witaj w konsolowej grze zrobionej przez Erzisa!" << endl;
- cout << "Jest to gra typu rozwoj miasta." << endl;
- cout << "Powodzenia!" << endl;
- cout << endl;
- cout << "Imie Twojego bohatera: " << imie;
- cin >> imie;
- system("cls");
- cout << "TWOJE STATYSTYKI" << endl;
- cout << endl;
- cout << "Liczba ludnosci: " << ludnosc << endl;
- cout << "Liczba domkow: " << domki << endl;
- cout << "Monety: " << gold << endl;
- cout << endl;
- cout << "Co chcesz zrobic???" << endl;
- cout << endl;
- cout << "1 = Zabic ludzi z miasta" << endl;
- cout << "2 = Kazac ludziom rozbudowac sie" << endl;
- cout << "3 = Zebrac podatki" << endl;
- cout << "4 = Krucjata" << endl;
- cin >> wybor_1;
- switch (wybor_1)
- {
- case 1:
- {
- cout << endl;
- cout << "Koniec gry!" << endl;
- Sleep(600);
- exit(0);
- }
- break;
- {
- case 2:
- {
- cout << endl;
- cout << "Ludzie poszli do lasu, przeniesli deski i wybudowali w osadzie 3 nowe domki." << endl;
- cout << "W Twojej osadzie jest teraz " << domki + 3 << " domkow!" << endl;
- cout << "Konsola sie wyczysci za 8 sekund" << endl;
- Sleep(8000);
- system("cls;");
- cout << "TWOJE STATYSTYKI" << endl;
- cout << endl;
- cout << "Liczba ludnosci: " << ludnosc << endl;
- cout << "Liczba domkow: " << domki + 3 << endl;
- cout << "Monety: " << gold << endl;
- cout << endl;
- cout << "Co chcesz zrobic???" << endl;
- cout << endl;
- cout << "1 = Statystyki bohatera" << endl;
- cout << "2 = Wybudowac twierdze" << endl;
- cout << "3 = Zebrac podatki" << endl;
- cout << "4 = Krucjata" << endl;
- cin >> wybor_2;
- switch (wybor_2)
- {
- case 1:
- {
- system("cls");
- cout << "Witaj " << imie << "." << " Oto Twoje statystyki!" << endl;
- cout << endl;
- cout << "Sila: 15" << endl;
- cout << "Zrecznosc: 5" << endl;
- cout << "Obrona: 43" << endl;
- cout << endl;
- cout << "Wpisz 1 i nacisnij enter aby powrocic do menu glownego" << endl;
- cin >> menu_back;
- if (menu_back == 1)
- {
- system("cls");
- cout << "TWOJE STATYSTYKI" << endl;
- cout << "Liczba ludnosci: " << ludnosc << endl;
- cout << "Liczba domkow: " << domki + 3 << endl;
- cout << "Monety: " << gold << endl;
- cout << endl;
- cout << "Co chcesz zrobic???" << endl;
- cout << endl;
- cout << "1 = Statystyki bohatera" << endl;
- cout << "2 = Wybudowac twierdze" << endl;
- cout << "3 = Zebrac podatki" << endl;
- cout << "4 = Krucjata" << endl;
- }
- else
- {
- cout << "To nie jest jeden..." << endl;
- cout << "Ostatnia proba. Jezeli teraz nie napiszesz 1 to gra sie wylaczy." << endl;
- cin >> menu_back;
- if (menu_back == 1)
- {
- system("cls");
- cout << "TWOJE STATYSTYKI" << endl;
- cout << endl;
- cout << "Liczba ludnosci: " << ludnosc << endl;
- cout << "Liczba domkow: " << domki + 3 << endl;
- cout << "Monety: " << gold << endl;
- cout << endl;
- cout << "Co chcesz zrobic???" << endl;
- cout << endl;
- cout << "1 = Statystyki bohatera" << endl;
- cout << "2 = Wybudowac twierdze" << endl;
- cout << "3 = Zebrac podatki" << endl;
- cout << "4 = Krucjata" << endl;
- }
- else
- {
- exit(0);
- }
- break;
- }
- }
- break;
- }
- }
- break;
- }
- case 3:
- {
- cout << endl;
- cout << "Zarobiles 6 monet." << endl;
- cout << "Teraz masz " << gold + 6 << " monet." << endl;
- cout << "Konsola sie wyczysci za 8 sekund" << endl;
- Sleep(8000);
- system("cls;");
- cout << "TWOJE STATYSTYKI" << endl;
- cout << endl;
- cout << "Liczba ludnosci: " << ludnosc << endl;
- cout << "Liczba domkow: " << domki << endl;
- cout << "Monety: " << gold + 6 << endl;
- cout << endl;
- cout << "Co chcesz zrobic???" << endl;
- cout << endl;
- cout << "1 = Statystyki bohatera" << endl;
- cout << "2 = Wybudowac twierdze" << endl;
- cout << "3 = Wydac 15 monet na ekwipunek dla armii" << endl;
- cout << "4 = Krucjata" << endl;
- }
- break;
- {
- case 4:
- {
- cout << endl;
- cout << "Niestety Turcy okazali sie szybsi! Zaszli was od tylu i byliscie zmuszeni do odwrotu" << endl;
- cout << "Konsola sie wyczysci za 8 sekund" << endl;
- Sleep(8000);
- system("cls;");
- cout << "TWOJE STATYSTYKI" << endl;
- cout << endl;
- cout << "Liczba ludnosci: " << ludnosc << endl;
- cout << "Liczba domkow: " << domki << endl;
- cout << "Monety: " << gold << endl;
- cout << endl;
- cout << "Co chcesz zrobic???" << endl;
- cout << endl;
- cout << "1 = Zabic ludzi z miasta" << endl;
- cout << "2 = Kazac ludziom rozbudowac sie" << endl;
- cout << "3 = Zebrac podatki" << endl;
- cout << "4 = Krucjata" << endl;
- }
- break;
- }
- }
- Sleep(2000000000000);
- return 0;
- }
- else
- {
- cout << "Niepoprawny CD-KEY! Gra sie wylaczy za 2 sekundy";
- Sleep(2500);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement