Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <cstdlib>
- #include <vector>
- #include <string>
- #include <string.h>
- #include <time.h>
- #include <ctime>
- #include <array>
- #include <algorithm>
- #include <chrono>
- #include <random>
- using namespace std;
- int main()
- {
- int geben;
- int halter;
- unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
- std::vector <string> foo = { "7Pick", "8Pick", "9Pick", "10Pick", "BubePick", "DamePick", "KoenigPick", "AsPick" };
- do
- {
- int x = 0;
- std::cin >> geben;
- shuffle(foo.begin(), foo.end(), std::default_random_engine(seed));
- if (foo[0] == "7Pick" || foo[1] == "7Pick" || foo[2] == "7Pick") { x += 7; }
- if (foo[0] == "8Pick" || foo[1] == "8Pick" || foo[2] == "8Pick") { x += 8; }
- if (foo[0] == "9Pick" || foo[1] == "9Pick" || foo[2] == "9Pick") { x += 9; }
- if (foo[0] == "10Pick" || foo[1] == "10Pick" || foo[2] == "10Pick") { x += 10; }
- if (foo[0] == "BubePick" || foo[1] == "BubePick" || foo[2] == "BubePick") { x += 10; }
- if (foo[0] == "DamePick" || foo[1] == "DamePick" || foo[2] == "DamePick") { x += 10; }
- if (foo[0] == "KoenigPick" || foo[1] == "KoenigPick" || foo[2] == "KoenigPick") { x += 10; }
- if (foo[0] == "AsPick" || foo[1] == "AsPick" || foo[2] == "AsPick") { x += 11; }
- std::cout << foo[0] << " " << foo[1] << " " << foo[2] << endl;
- std::cout << x << endl;
- foo.erase(foo.begin(), foo.begin() + 3);
- if (foo.size() < 3)
- {
- cout << "Keine karten mehr" << endl;
- }
- } while (geben == 1);
- std::cout << endl;
- std::system("PAUSE");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement