Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. /*
  2. Name Galgenmännchen.cpp
  3. Zweck Spiel Galgenmännchen
  4. Datum 05.06.18
  5. Name des Programmierers JK/JS
  6. */
  7.  
  8.  
  9. #include <iostream>
  10. #include <vector>
  11. #include <string>
  12. #include <iomanip>
  13. #include <conio.h>
  14. using namespace std;
  15.  
  16. vector<string>screen;
  17. vector<string>wort;
  18. int len = wort.size();
  19.  
  20. void einlesen()
  21. {
  22. string eingabe;
  23. char c;
  24. cout << "Bitte geben sie ein Wort ein! " << endl;
  25. cout << "Bestaetigen sie ihre Eingabe mit 'ENTER'" << endl;
  26. while ((c = _getch()) != 13)
  27. { cout << "*";
  28. eingabe += c;
  29. wort.push_back(eingabe);
  30. screen.push_back(eingabe);
  31. eingabe.erase();
  32.  
  33. }
  34. cout << endl;
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. /*
  43. for (int y = 0; y < len; y++)
  44. {
  45. letter[y] = eingabe[y];
  46. cout << letter[y];
  47. }
  48. for (int i = 0;i < len; i++)
  49. {
  50. if (letter[i] > 65 ||eingabe[i] < 90)
  51. { }
  52.  
  53. else if (eingabe[i] > 97 || eingabe[i] < 122)
  54. {
  55. cout << "Bitte geben Sie nur buchstaben ein!" <<endl;
  56. }
  57. else
  58. {
  59. cout << "Nur Buchstaben, du Huan!" << endl;
  60. }
  61. }
  62. */
  63.  
  64.  
  65. }
  66. void anzeige()
  67. {
  68.  
  69.  
  70.  
  71. }
  72.  
  73.  
  74.  
  75. void untersuchen()
  76. {
  77. string eingabe;
  78. int easy = 15;
  79. int medium = 10;
  80. int hard = 6;
  81. for (int e = 0; e < easy; e++)
  82. {
  83. cout << "BUCHSTABE, JETZT!!!" << endl;
  84. cin >> eingabe;
  85. //_getch(); Falls das möglich ist.
  86. for (int i = 0;i < len;i++)
  87. {
  88. if (wort[i] == eingabe)
  89. {
  90. screen[i] = eingabe;
  91. }
  92. else
  93. {
  94. cout << "Ups, du Lappen das war falsch!";
  95. }
  96. eingabe.erase();
  97. }
  98. }
  99. cout << "ALTER DAS IST EASY BIST DU SCHEISSE MAN? Aber nochmal ??? XD (y/n) coming soon!!" <<endl;
  100. }
  101.  
  102.  
  103.  
  104.  
  105. void strich()
  106. {
  107.  
  108.  
  109.  
  110. string x;
  111. x = '_';
  112. for (int i = 0; i < len; i++)
  113. {
  114. screen[i] = x;
  115. cout << screen[i] << " ";
  116. }
  117.  
  118. }
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. int main(){
  126. einlesen();
  127. strich();
  128. untersuchen();
  129.  
  130.  
  131. system("pause");
  132.  
  133. }
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143. // ______
  144. // |/ O
  145. // | \|/
  146. // | |
  147. // | / \
  148. // / \
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156. /*
  157. +---------------------------------+
  158. |             HANG MAN            |
  159. +---------------------------------+
  160. |               |                 |
  161. |               |                 |
  162. |               O                 |
  163. |              /|\                |
  164. |               |                 |
  165. |              / \                |
  166. |         +----------+            |
  167. |         |          |            |
  168. +---------------------------------+
  169. |        Available letters        |
  170. +---------------------------------+
  171. |     A B C D E F G H I J K L M   |
  172. |     N O P Q R S T U V W X Y Z   |
  173. +---------------------------------+
  174. |         Guess the word          |
  175. +---------------------------------+
  176. | _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
  177. +---------------------------------+
  178. >
  179. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement