Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Name Galgenmännchen.cpp
- Zweck Spiel Galgenmännchen
- Datum 05.06.18
- Name des Programmierers JK/JS
- */
- #include <iostream>
- #include <vector>
- #include <string>
- #include <iomanip>
- #include <conio.h>
- using namespace std;
- vector<string>screen;
- vector<string>wort;
- int len = wort.size();
- void einlesen()
- {
- string eingabe;
- char c;
- cout << "Bitte geben sie ein Wort ein! " << endl;
- cout << "Bestaetigen sie ihre Eingabe mit 'ENTER'" << endl;
- while ((c = _getch()) != 13)
- { cout << "*";
- eingabe += c;
- wort.push_back(eingabe);
- screen.push_back(eingabe);
- eingabe.erase();
- }
- cout << endl;
- /*
- for (int y = 0; y < len; y++)
- {
- letter[y] = eingabe[y];
- cout << letter[y];
- }
- for (int i = 0;i < len; i++)
- {
- if (letter[i] > 65 ||eingabe[i] < 90)
- { }
- else if (eingabe[i] > 97 || eingabe[i] < 122)
- {
- cout << "Bitte geben Sie nur buchstaben ein!" <<endl;
- }
- else
- {
- cout << "Nur Buchstaben, du Huan!" << endl;
- }
- }
- */
- }
- void anzeige()
- {
- }
- void untersuchen()
- {
- string eingabe;
- int easy = 15;
- int medium = 10;
- int hard = 6;
- for (int e = 0; e < easy; e++)
- {
- cout << "BUCHSTABE, JETZT!!!" << endl;
- cin >> eingabe;
- //_getch(); Falls das möglich ist.
- for (int i = 0;i < len;i++)
- {
- if (wort[i] == eingabe)
- {
- screen[i] = eingabe;
- }
- else
- {
- cout << "Ups, du Lappen das war falsch!";
- }
- eingabe.erase();
- }
- }
- cout << "ALTER DAS IST EASY BIST DU SCHEISSE MAN? Aber nochmal ??? XD (y/n) coming soon!!" <<endl;
- }
- void strich()
- {
- string x;
- x = '_';
- for (int i = 0; i < len; i++)
- {
- screen[i] = x;
- cout << screen[i] << " ";
- }
- }
- int main(){
- einlesen();
- strich();
- untersuchen();
- system("pause");
- }
- // ______
- // |/ O
- // | \|/
- // | |
- // | / \
- // / \
- /*
- +---------------------------------+
- | HANG MAN |
- +---------------------------------+
- | | |
- | | |
- | O |
- | /|\ |
- | | |
- | / \ |
- | +----------+ |
- | | | |
- +---------------------------------+
- | Available letters |
- +---------------------------------+
- | A B C D E F G H I J K L M |
- | N O P Q R S T U V W X Y Z |
- +---------------------------------+
- | Guess the word |
- +---------------------------------+
- | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
- +---------------------------------+
- >
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement