1 | #include <stdio.h>
|
2 | #include <stdlib.h>
|
3 | #include <time.h>
|
4 |
|
5 | int main()
|
6 | {
|
7 | int Menue, Aktion, Flaschen, FT=1, BT=1, MT=1, AT=1, Buero=61, Bett=1, Tag=1;
|
8 | int Angestellte=60, Spiel, SpielEingabe, Zufall, P1=0, P2=0, P3=0,PTest=0;
|
9 | int Vertrag=1, Afeuern, Bverkaufen, Farbe;
|
10 | float Konto=60000, Geld, Einsatz, Lohn=47.50;
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | do{
|
16 | system("CLS");
|
17 | printf("\t\t---------Spiel des Lebens----------\n\n\n");
|
18 | printf(" --1-- Spiel starten\n\n");
|
19 | printf(" --2-- Anleitung\n\n");
|
20 | printf(" --3-- Farbe \x8Endern\n\n");
|
21 | printf(" --4-- Credits\n\n");
|
22 | printf(" --5-- Spiel beenden\n\n\n\n");
|
23 |
|
24 |
|
25 | scanf("%i",&Menue);
|
26 | fflush(stdin);
|
27 | if(Menue==1){
|
28 | do{
|
29 | system("CLS");
|
30 | printf("\n Tag %2i\n\n",Tag);
|
31 | printf(" Kontostand: %.2f $\n\n",Konto);
|
32 | printf(" B\x81ros: %i\n\n",Buero);
|
33 | printf(" Angestellte: %i\n\n\n",Angestellte);
|
34 | if(Konto<10000)
|
35 | printf(" - 1- Flaschen sammeln\n\n");
|
36 | if(Konto>=10000 && Konto<50000)
|
37 | printf(" - 1- Tagesvertraege mit anderen Firmen schliessen\n\n");
|
38 | if(Konto>=50000)
|
39 | printf(" - 1- B\x81ros von anderen Firmen kaufen\n\n");
|
40 | if(Konto<10000)
|
41 | printf(" - 2- Betteln gehen\n\n");
|
42 | if(Konto>=10000 && Konto<50000)
|
43 | printf(" - 2- Bei grossen Firmen schnurren gehen\n\n");
|
44 | if(Konto>=50000)
|
45 | printf(" - 2- Vertrag mit Riesenunternehmen eroeffnen\n\n");
|
46 | if(Konto<10000)
|
47 | printf(" - 3- Kindern das Milchgeld wegnehmen\n\n");
|
48 | if(Konto>=10000 && Konto<50000)
|
49 | printf(" - 3- Kleine Firmen um ihren Lohn prellen\n\n");
|
50 | if(Konto>=50000)
|
51 | printf(" - 3- Steuern hinterziehen\n\n");
|
52 | printf(" - 4- Arbeiten gehen\n\n");
|
53 | printf(" - 5- B\x81ro kaufen(2500 $)\n\n");
|
54 | printf(" - 6- Angestellten kaufen(50 $)\n\n");
|
55 | printf(" - 7- Lohn festlegen\n\n");
|
56 | printf(" - 8- B\x81ros verkaufen\n\n");
|
57 | printf(" - 9- Angestellte feuern\n\n");
|
58 | printf(" -10- Bett kaufen(300 $)\n\n");
|
59 | printf(" -11- Schlafen\n\n");
|
60 | printf(" -12- Ins Casino gehen\n\n");
|
61 | printf(" -13- Zurueck\n\n");
|
62 | if(Tag==10){
|
63 | if(P1==0){
|
64 | if(PTest==0){
|
65 | system("CLS");
|
66 | printf("\nGlueckwunsch! Du hast 10 Tage lang nicht geklaut oder betrogen!\nDafuer 2500 $!");
|
67 | Konto=Konto+2500;
|
68 | P1=1;
|
69 | getchar();
|
70 | continue;
|
71 | }
|
72 | }
|
73 | }
|
74 | if(Tag==20){
|
75 | if(P2==0){
|
76 | if(PTest==0){
|
77 | system("CLS");
|
78 | printf("\nGlueckwunsch! Du hast 20 Tage lang nicht geklaut oder betrogen!\nDaf\x81r 5000 $!");
|
79 | Konto=Konto+5000;
|
80 | P2=1;
|
81 | getchar();
|
82 | continue;
|
83 | }
|
84 | }
|
85 | }
|
86 | if(Tag==30){
|
87 | if(P3==0){
|
88 | if(PTest==0){
|
89 | system("CLS");
|
90 | printf("\nGlueckwunsch! Du hast 30 Tage lang nicht geklaut oder betrogen!\nDaf\x81r 10000 $!");
|
91 | Konto=Konto+10000;
|
92 | P3=1;
|
93 | getchar();
|
94 | continue;
|
95 | }
|
96 | }
|
97 | }
|
98 |
|
99 | if(Vertrag==0){
|
100 | srand(time(0));
|
101 | Zufall=1+(rand()%(6-1));
|
102 | if(Zufall==2){
|
103 | if(Angestellte>0){
|
104 | system("CLS");
|
105 | printf("\nDas Riesenunternehmen hat sich einen Angestellten von dir genommen!\a");
|
106 | Angestellte=Angestellte-1;
|
107 | getchar();
|
108 | continue;
|
109 | }
|
110 | if(Angestellte<1){
|
111 | system("CLS");
|
112 | printf("\nDas Riesenunternehmen hat den Vertrag mit dir gekündigt, da keine Angestellten zur Verfügung\nstanden, als das Unternehmen sie brauchte.\a\a");
|
113 | Vertrag=1;
|
114 | getchar();
|
115 | continue;
|
116 | }
|
117 | }
|
118 | }
|
119 | if(Angestellte>=1){
|
120 | if(Lohn<=10){
|
121 | srand(time(0));
|
122 | Zufall=1+(rand()%(5-1));
|
123 | if(Zufall==3){
|
124 | system("CLS");
|
125 | printf("\nEiner deiner Angestellten hat gek\x81ndigt!\a\a");
|
126 | Angestellte=Angestellte-1;
|
127 | getchar();
|
128 | continue;
|
129 | }
|
130 | if(Zufall==2){
|
131 | system("CLS");
|
132 | printf("\nEiner deiner Angestellten bittet dich um eine Lohnerhoehung!");
|
133 | getchar();
|
134 | continue;
|
135 | }
|
136 | }
|
137 | if(Lohn<=20){
|
138 | if(Lohn>10){
|
139 | srand(time(0));
|
140 | Zufall=1+(rand()%(10-1));
|
141 | if(Zufall==5){
|
142 | system("CLS");
|
143 | printf("\nEiner deiner Angestellten hat gek\x81ndigt!\a\a");
|
144 | Angestellte=Angestellte-1;
|
145 | getchar();
|
146 | continue;
|
147 | }
|
148 | if(Zufall==2){
|
149 | system("CLS");
|
150 | printf("\nEiner deiner Angestellten bittet dich um eine Lohnerhoehung!");
|
151 | getchar();
|
152 | continue;
|
153 | }
|
154 | }
|
155 | }
|
156 | if(Lohn<=30){
|
157 | if(Lohn>20){
|
158 | srand(time(0));
|
159 | Zufall=1+(rand()%(20-1));
|
160 | if(Zufall==5){
|
161 | system("CLS");
|
162 | printf("\nEiner deiner Angestellten hat gek\x81ndigt!\a\a");
|
163 | Angestellte=Angestellte-1;
|
164 | getchar();
|
165 | continue;
|
166 | }
|
167 | if(Zufall==2){
|
168 | system("CLS");
|
169 | printf("\nEiner deiner Angestellten bittet dich um eine Lohnerhoehung!");
|
170 | getchar();
|
171 | continue;
|
172 | }
|
173 | }
|
174 | }
|
175 | if(Lohn<=40){
|
176 | if(Lohn>30){
|
177 | srand(time(0));
|
178 | Zufall=1+(rand()%(30-1));
|
179 | if(Zufall==5){
|
180 | system("CLS");
|
181 | printf("\nEiner deiner Angestellten hat gek\x81ndigt!\a\a");
|
182 | Angestellte=Angestellte-1;
|
183 | getchar();
|
184 | continue;
|
185 | }
|
186 | if(Zufall==2){
|
187 | system("CLS");
|
188 | printf("\nEiner deiner Angestellten bittet dich um eine Lohnerhoehung!");
|
189 | getchar();
|
190 | continue;
|
191 | }
|
192 | }
|
193 | }
|
194 | if(Lohn<=50){
|
195 | if(Lohn>40){
|
196 | srand(time(0));
|
197 | Zufall=1+(rand()%(40-1));
|
198 | if(Zufall==5){
|
199 | system("CLS");
|
200 | printf("\nEiner deiner Angestellten hat gek\x81ndigt!\a\a");
|
201 | Angestellte=Angestellte-1;
|
202 | getchar();
|
203 | continue;
|
204 | }
|
205 | if(Zufall==2){
|
206 | system("CLS");
|
207 | printf("\nEiner deiner Angestellten bittet dich um eine Lohnerhoehung!");
|
208 | getchar();
|
209 | continue;
|
210 | }
|
211 | }
|
212 | }
|
213 | if(Lohn<=60){
|
214 | if(Lohn>50){
|
215 | srand(time(0));
|
216 | Zufall=1+(rand()%(50-1));
|
217 | if(Zufall==5){
|
218 | system("CLS");
|
219 | printf("\nEiner deiner Angestellten hat gek\x81ndigt!\a\a");
|
220 | Angestellte=Angestellte-1;
|
221 | getchar();
|
222 | continue;
|
223 | }
|
224 | if(Zufall==2){
|
225 | system("CLS");
|
226 | printf("\nEiner deiner Angestellten bittet dich um eine Lohnerhoehung!");
|
227 | getchar();
|
228 | continue;
|
229 | }
|
230 | }
|
231 | }
|
232 | if(Lohn>60){
|
233 | srand(time(0));
|
234 | Zufall=1+(rand()%(100-1));
|
235 | if(Zufall==5){
|
236 | system("CLS");
|
237 | printf("\nEiner deiner Angestellten hat gek\x81ndigt!\a\a");
|
238 | Angestellte=Angestellte-1;
|
239 | getchar();
|
240 | continue;
|
241 | }
|
242 | if(Zufall==2){
|
243 | system("CLS");
|
244 | printf("\nEiner deiner Angestellten bittet dich um eine Lohnerhoehung!");
|
245 | getchar();
|
246 | continue;
|
247 | }
|
248 |
|
249 | }
|
250 | }
|
251 | scanf("%i",&Aktion);
|
252 | fflush(stdin);
|
253 | if(Aktion==1){
|
254 | if(Konto<10000){
|
255 | if(FT==1){
|
256 | do{
|
257 | system("CLS");
|
258 | printf("\nWie viele Flaschen willst du sammeln(max.100)?\n");
|
259 | scanf("%i",&Flaschen);
|
260 | fflush(stdin);
|
261 | if(Flaschen<=100){
|
262 | printf("\nDu hast %i Flaschen gesammelt und einen Pfandpreis von %.2f $ erhalten.",Flaschen,Flaschen*1.65);
|
263 | Konto=Konto+(Flaschen*1.65);
|
264 | FT=0;
|
265 | getchar();
|
266 | }
|
267 | else{
|
268 | system("CLS");
|
269 | printf("\nDu kannst max. nur 100 Flaschen sammeln!");
|
270 | getchar();
|
271 | }
|
272 |
|
273 | }while(Flaschen>100);
|
274 | continue;
|
275 | }
|
276 |
|
277 | if(FT==0){
|
278 | system("CLS");
|
279 | printf("\nDu hast heute schon Flaschen gesammelt!\a");
|
280 | getchar();
|
281 | continue;
|
282 | }
|
283 | }
|
284 | if(Konto>=10000 && Konto<50000){
|
285 | if(FT==1){
|
286 | do{
|
287 | system("CLS");
|
288 | printf("\nWie viele Vetraege willst du schließen(max.100)?\n");
|
289 | scanf("%i",&Flaschen);
|
290 | fflush(stdin);
|
291 | if(Flaschen<=100){
|
292 | printf("\nDu hast %i Vertraege geschlossen und %.2f $ erhalten.",Flaschen,Flaschen*102.45);
|
293 | Konto=Konto+(Flaschen*102.45);
|
294 | FT=0;
|
295 | getchar();
|
296 | }
|
297 | else{
|
298 | system("CLS");
|
299 | printf("\nDu kannst max. nur 100 Vertraege schließen!");
|
300 | getchar();
|
301 | }
|
302 | }while(Flaschen>100);
|
303 | continue;
|
304 | }
|
305 |
|
306 | if(FT==0){
|
307 | system("CLS");
|
308 | printf("\nDu hast heute schon Verträge geschlossen!\a");
|
309 | getchar();
|
310 | continue;
|
311 | }
|
312 | }
|
313 | if(Konto>=50000){
|
314 | if(FT==1){
|
315 | do{
|
316 | system("CLS");
|
317 | printf("\nWie viele B\x81ros willst du für je 3000 $ kaufen(max.50)?\n");
|
318 | scanf("%i",&Flaschen);
|
319 | fflush(stdin);
|
320 | if(Flaschen<=50){
|
321 | printf("\nDu hast %i B\x81ros gekauft und %.2i $ bezahlt(pro B\x81ro 3000 $)",Flaschen,Flaschen*3000);
|
322 | Konto=Konto-(Flaschen*3000);
|
323 | FT=0;
|
324 | getchar();
|
325 | }
|
326 | else{
|
327 | system("CLS");
|
328 | printf("\nDu kannst max. nur 50 B\x81ros kaufen!");
|
329 | getchar();
|
330 | }
|
331 | }while(Flaschen>50);
|
332 | continue;
|
333 | }
|
334 |
|
335 | if(FT==0){
|
336 | system("CLS");
|
337 | printf("\nDu hast heute schon B\x81ros gekauft!\a");
|
338 | getchar();
|
339 | continue;
|
340 | }
|
341 | }
|
342 | }
|
343 | if(Aktion==2){
|
344 | if(Konto<10000){
|
345 | if(BT==1){
|
346 | system("CLS");
|
347 | srand(time(0));
|
348 | Geld=1+(rand()%(150-20));
|
349 | printf("\nDu hast heute %.2f $ erbettelt",Geld);
|
350 | Konto=Konto+Geld;
|
351 | BT=0;
|
352 | getchar();
|
353 | continue;
|
354 | }
|
355 | if(BT==0){
|
356 | system("CLS");
|
357 | printf("\nDu hast heute schon gebettelt!\a");
|
358 | getchar();
|
359 | continue;
|
360 | }
|
361 | }
|
362 | if(Konto>=10000 && Konto<50000){
|
363 | if(BT==1){
|
364 | system("CLS");
|
365 | srand(time(0));
|
366 | Geld=1+(rand()%(1000-100));
|
367 | printf("\nDu hast heute %.2f $ geschnurrt",Geld);
|
368 | Konto=Konto+Geld;
|
369 | BT=0;
|
370 | getchar();
|
371 | continue;
|
372 | }
|
373 | if(BT==0){
|
374 | system("CLS");
|
375 | printf("\nDu hast heute schon geschnurrt!\a");
|
376 | getchar();
|
377 | continue;
|
378 | }
|
379 | }
|
380 | if(Konto>50000){
|
381 | if(Vertrag==1){
|
382 | system("CLS");
|
383 | printf("\nDu hast jetzt ein Vertrag mit einem Riesenunternehmen.\n\nPro Tag bekommst 10000 $.\nDafür nimmt sich das Riesenunternehmen,\nwann immer es sie braucht, Angestellte von dir.",Geld);
|
384 | Vertrag=0;
|
385 | getchar();
|
386 | continue;
|
387 | }
|
388 | if(Vertrag==0){
|
389 | system("CLS");
|
390 | printf("\nDu hast schon einen Vertrag mit einem Riesenunternehmen !\a");
|
391 | getchar();
|
392 | continue;
|
393 | }
|
394 | }
|
395 |
|
396 | }
|
397 | if(Aktion==3){
|
398 | if(Konto<10000){
|
399 | if(MT==1){
|
400 | system("CLS");
|
401 | srand(time(0));
|
402 | Geld=1+(rand()%(20-1));
|
403 | printf("\nDu hast heute %.2f $ erbeutet",Geld);
|
404 | Konto=Konto+Geld;
|
405 | PTest=PTest+1;
|
406 | MT=0;
|
407 | getchar();
|
408 | continue;
|
409 | }
|
410 |
|
411 | if(MT==0){
|
412 | system("CLS");
|
413 | printf("\nDu hast heute schon Milchgeld geklaut!\a");
|
414 | getchar();
|
415 | continue;
|
416 | }
|
417 | }
|
418 | if(Konto>=10000 && Konto<50000){
|
419 |
|
420 | if(MT==1){
|
421 | system("CLS");
|
422 | srand(time(0));
|
423 | Geld=1+(rand()%(500-30));
|
424 | printf("\nDu hast heute eine Firma um %.2f $ betrogen!",Geld);
|
425 | Konto=Konto+Geld;
|
426 | PTest=PTest+1;
|
427 | MT=0;
|
428 | getchar();
|
429 | continue;
|
430 | }
|
431 | if(MT==0){
|
432 | system("CLS");
|
433 | printf("\nDu hast heute schon kleine Firmen geprellt\a");
|
434 | getchar();
|
435 | continue;
|
436 | }
|
437 | }
|
438 | if(Konto>50000){
|
439 |
|
440 | if(MT==1){
|
441 | system("CLS");
|
442 | srand(time(0));
|
443 | Zufall=1+(rand()%(8-1));
|
444 | if(Zufall==2){
|
445 | printf("\nDu wurdest beim Steuerhinterziehen erwischt");
|
446 | if(Konto>=60000){
|
447 | printf(", konntest dich aber\nfür 60000 $ freikaufen.");
|
448 | Konto=Konto-600000;
|
449 | MT=0;
|
450 | getchar();
|
451 | continue;
|
452 | }
|
453 | if(Konto<60000){
|
454 | printf("und kannst dich nicht\nfreikaufen(60000$).\nDeine Karriere endet mit 5 Jahren Haft.\nDas haettest du dir vielleicht besser ueberlegen sollen!");
|
455 | getchar();
|
456 | return 0;
|
457 | }
|
458 | }
|
459 | else{
|
460 | srand(time(0));
|
461 | Geld=1+(rand()%(100000-50000));
|
462 | printf("\nDu kassierst %.2f durch Steuerhinterziehung.",Geld);
|
463 | Konto=Konto+Geld;
|
464 | MT=0;
|
465 | getchar();
|
466 | continue;
|
467 | }
|
468 | }
|
469 | if(MT==0){
|
470 | system("CLS");
|
471 | printf("\nDu hast heute schon Steuern hinterzogen!\a");
|
472 | getchar();
|
473 | continue;
|
474 | }
|
475 | }
|
476 | }
|
477 | if(Aktion==4){
|
478 | if(Buero==0){
|
479 | if(AT==1){
|
480 | system("CLS");
|
481 | printf("\nDu hast gearbeitet und 150$ verdient!");
|
482 | Konto=Konto+150;
|
483 | AT=0;
|
484 | getchar();
|
485 | continue;
|
486 | }
|
487 | if(AT==0){
|
488 | system("CLS");
|
489 | printf("\nDu hast heute schon gearbeitet!\a");
|
490 | getchar();
|
491 | continue;
|
492 | }
|
493 | }
|
494 | if(Buero>=1){
|
495 | if(AT==1){
|
496 | system("CLS");
|
497 | printf("\nDu hast gearbeitet und %.2f verdient!",(Angestellte*125.95)+300);
|
498 | Konto=(Konto+(Angestellte*125.95)+300);
|
499 | AT=0;
|
500 | getchar();
|
501 | continue;
|
502 | }
|
503 | if(AT==0){
|
504 | system("CLS");
|
505 | printf("\nDu hast heute schon gearbeitet!\a");
|
506 | getchar();
|
507 | continue;
|
508 | }
|
509 | }
|
510 | }
|
511 | if(Aktion==5){
|
512 |
|
513 | if(Konto>=2500){
|
514 | system("CLS");
|
515 | printf("\nDu hast ein neues B\x81ro fuer dich oder deine Angestellten!\n");
|
516 | Konto=Konto-2500;
|
517 | Buero=Buero+1;
|
518 | getchar();
|
519 | continue;
|
520 | }
|
521 | if(Konto<2500){
|
522 | system("CLS");
|
523 | printf("\nDu hast nicht genug Geld!");
|
524 | getchar();
|
525 | continue;
|
526 | }
|
527 |
|
528 |
|
529 | }
|
530 | if(Aktion==6){
|
531 | system("CLS");
|
532 | if(Buero==0){
|
533 | printf("\nDu musst dir erst dein eigenes B\x81ro kaufen!");
|
534 | getchar();
|
535 | continue;
|
536 | }
|
537 | if(Buero>1){
|
538 | if(Buero>(Angestellte+1)){
|
539 | if(Konto<50){
|
540 | printf("\nDu hast zu wenig Geld!");
|
541 | getchar();
|
542 | continue;
|
543 | }
|
544 | if(Konto>=50){
|
545 | printf("\nDu hast dir einen neuen Angestellten f\x81r 50 $ gekauft!");
|
546 | Konto=Konto-50;
|
547 | Angestellte=Angestellte+1;
|
548 | getchar();
|
549 | continue;
|
550 | }
|
551 | }
|
552 | }
|
553 | if(Buero==(Angestellte+1)){
|
554 | printf("\nDu musst erst ein neues B\x81ro kaufen!");
|
555 | getchar();
|
556 | continue;
|
557 | }
|
558 | }
|
559 | if(Aktion==7){
|
560 | printf("\nAlter Lohn: %.2f",Lohn);
|
561 | printf("\nNeuer Lohn: ");
|
562 | scanf("%f",&Lohn);
|
563 | fflush(stdin);
|
564 | printf("\nLohn erfolgreich geaendert!");
|
565 | getchar();
|
566 | continue;
|
567 | }
|
568 | if(Aktion==8){
|
569 | system("CLS");
|
570 | printf("\nWie viele Bueros willst du verkaufen?\n\n");
|
571 | scanf("%i",&Bverkaufen);
|
572 | fflush(stdin);
|
573 | if(Angestellte>0){
|
574 | if((Bverkaufen<Buero) && (Buero>(Angestellte+1))){
|
575 | Buero=Buero-Bverkaufen;
|
576 | printf("\n%i Bueros fuer %i $ erfolgreich verkauft!",Bverkaufen,Bverkaufen*1000);
|
577 | Konto=Konto+(Bverkaufen*1000);
|
578 | getchar();
|
579 | continue;
|
580 | }
|
581 | if(Bverkaufen>Buero){
|
582 | printf("\nDu kannst nur Bueros verkaufen,\nwelche du auch besitzt.");
|
583 | getchar();
|
584 | continue;
|
585 | }
|
586 | if((Bverkaufen==Buero) || ((Angestellte+1)==Buero)){
|
587 | printf("\nDu musst erst Angestellte feuern!");
|
588 | getchar();
|
589 | continue;
|
590 | }
|
591 | }
|
592 | if(Angestellte==0){
|
593 | if(Bverkaufen<=Buero){
|
594 | Buero=Buero-Bverkaufen;
|
595 | printf("\n%i Bueros fuer %i $ erfolgreich verkauft!",Bverkaufen,Bverkaufen*1000);
|
596 | Konto=Konto+(Bverkaufen*1000);
|
597 | getchar();
|
598 | continue;
|
599 | }
|
600 | if(Bverkaufen>Buero){
|
601 | printf("\nDu kannst nur Bueros verkaufen,\nwelche du auch besitzt.");
|
602 | getchar();
|
603 | continue;
|
604 | }
|
605 | }
|
606 |
|
607 |
|
608 | }
|
609 | if(Aktion==9){
|
610 | system("CLS");
|
611 | printf("\nWie viele Angestellte willst du feuern?\n\n");
|
612 | scanf("%i",&Afeuern);
|
613 | fflush(stdin);
|
614 | if(Afeuern>Angestellte){
|
615 | printf("\nDu kannst nur Angestellte feuern, welche f\x81r dich arbeiten!");
|
616 | getchar();
|
617 | continue;
|
618 | }
|
619 | if(Afeuern<=Angestellte){
|
620 | printf("\n%i Angestellte erfolgreich gefeuert!",Afeuern);
|
621 | Angestellte=Angestellte-Afeuern;
|
622 | getchar();
|
623 | continue;
|
624 | }
|
625 | }
|
626 | if(Aktion==10){
|
627 | if(Bett==0){
|
628 | if(Konto>=300){
|
629 | system("CLS");
|
630 | printf("\nDu hast jetzt ein Bett und kannst schlafen!\n");
|
631 | Konto=Konto-300;
|
632 | Bett=1;
|
633 | getchar();
|
634 | continue;
|
635 | }
|
636 | if(Konto<300){
|
637 | system("CLS");
|
638 | printf("\nDu hast nicht genug Geld!");
|
639 | getchar();
|
640 | continue;
|
641 | }
|
642 | }
|
643 | if(Bett==1){
|
644 | system("CLS");
|
645 | printf("\nDu hast schon ein Bett!");
|
646 | getchar();
|
647 | continue;
|
648 | }
|
649 |
|
650 | }
|
651 | if(Aktion==11){
|
652 | if(Bett==1){
|
653 | system("CLS");
|
654 | printf("\nDu hast geschlafen und dich gut erholt!");
|
655 | if(Angestellte>0){
|
656 | printf("\n\nVon deinem Konto wurden %.2f $ Angestelltenlohn abgezogen!\n(je %f $ pro Angestellten)",Angestellte*Lohn,Lohn);
|
657 | Konto=Konto-(Angestellte*Lohn);
|
658 | }
|
659 | if(Vertrag==0){
|
660 | printf("\n\nDu bekommst 10000 $ von dem Riesenunternehmen!");
|
661 | Konto=Konto+10000;
|
662 | }
|
663 | AT=1;
|
664 | MT=1;
|
665 | FT=1;
|
666 | BT=1;
|
667 | Tag=Tag+1;
|
668 | getchar();
|
669 | continue;
|
670 | }
|
671 | if(Bett==0){
|
672 | system("CLS");
|
673 | printf("\nDu musst dir erst ein Bett kaufen um schlafen zu koennen!");
|
674 | getchar();
|
675 | continue;
|
676 | }
|
677 | }
|
678 | if(Aktion==13){
|
679 | system("CLS");
|
680 | printf("\nDu bist nun wieder im Hauptmenue!\n\n");
|
681 | continue;
|
682 | }
|
683 | if(Aktion==12){
|
684 | system("CLS");
|
685 | printf("\nKonto: %.2f $\n",Konto);
|
686 | printf("\nDas ist das Hutspiel.\nWenn du richtig liegst, bekommst du deinen Wetteinsatz ausgezahlt,\nwenn nicht, ist das Geld verloren.\n");
|
687 | printf("\nDein Wetteinsatz:\n\n");
|
688 | scanf("%f",&Einsatz);
|
689 | fflush(stdin);
|
690 | if(Konto>=Einsatz){
|
691 | system("CLS");
|
692 | printf("\nWelche Zahl denke ich mir? 1, 2 oder 3?\n");
|
693 | srand(time(0));
|
694 | Spiel=1+(rand()%(4-1));
|
695 | scanf("%i",&SpielEingabe);
|
696 | fflush(stdin);
|
697 | if(SpielEingabe==Spiel){
|
698 | printf("\n\nRichtig!!! Du bekommst %.2f $ ausgezahlt.",Einsatz);
|
699 | Konto=Konto+Einsatz;
|
700 | getchar();
|
701 | continue;
|
702 | }
|
703 | if(SpielEingabe!=Spiel){
|
704 | printf("\n\nFalsch!!! Du verlierst %.2f $. \n\n%i w\x8Ere richtig gewesen.",Einsatz,Spiel);
|
705 | Konto=Konto-Einsatz;
|
706 | getchar();
|
707 | continue;
|
708 | }
|
709 | }
|
710 | if(Konto<Einsatz){
|
711 | system("CLS");
|
712 | printf("\nDu hast zu wenig Geld!");
|
713 | getchar();
|
714 | continue;
|
715 | }
|
716 |
|
717 | }
|
718 | else{
|
719 | system("CLS");
|
720 | printf("Ung\x81ltige Eingabe! Erneute Eingabe:\a\n");
|
721 | }
|
722 | }while(Aktion!=13);
|
723 | continue;
|
724 | }
|
725 | if(Menue==2){
|
726 | system("CLS");
|
727 | printf("\n Anleitung:\n\n");
|
728 | printf("\n Du hast alles verloren...");
|
729 | getchar();
|
730 | system("CLS");
|
731 | printf("\n Du wachst unter einer Br\x81 cke auf...");
|
732 | getchar();
|
733 | system("CLS");
|
734 | printf("\n Und musst nun von ganz vorne anfangen!");
|
735 | getchar();
|
736 | system("CLS");
|
737 | printf("\n Benutze die Zahlentasten und die Entertaste um im Spiel zu navigieren.\n Wirst du Million\x8Er?");
|
738 | getchar();
|
739 | continue;
|
740 | }
|
741 | if(Menue==3){
|
742 | system("CLS");
|
743 | printf("\n\n -1- schwarz weiss\n\n -2- scwarz gelb\n\n -3- schwarz rot\n\n -4- schwarz gr\x81n\n\n -5- schwarz blau\n\n -6- weiss scwarz\n\n -7- weiss blau\n\n -8- weiss gr\x81n\n\n -9- weiss rot\n\n -10- weiss gelb\n\n");
|
744 | scanf("%i",&Farbe);
|
745 | fflush(stdin);
|
746 | if(Farbe==1){
|
747 | system("color 0F");
|
748 | continue;
|
749 | }
|
750 | if(Farbe==2){
|
751 | system("color 0E");
|
752 | continue;
|
753 | }
|
754 | if(Farbe==3){
|
755 | system("color 0C");
|
756 | continue;
|
757 | }
|
758 | if(Farbe==4){
|
759 | system("color 0A");
|
760 | continue;
|
761 | }
|
762 | if(Farbe==5){
|
763 | system("color 09");
|
764 | continue;
|
765 | }
|
766 | if(Farbe==6){
|
767 | system("color F0");
|
768 | continue;
|
769 | }
|
770 | if(Farbe==7){
|
771 | system("color F9");
|
772 | continue;
|
773 | }
|
774 | if(Farbe==8){
|
775 | system("color FA");
|
776 | continue;
|
777 | }
|
778 | if(Farbe==9){
|
779 | system("color FC");
|
780 | continue;
|
781 | }
|
782 | if(Farbe==10){
|
783 | system("color FE");
|
784 | continue;
|
785 | }
|
786 | else{
|
787 | printf("Ungueltige Eingabe!");
|
788 | getchar();
|
789 | continue;
|
790 | }
|
791 | }
|
792 | if(Menue==4){
|
793 | printf("\nIdee: Richard Keil, Sebastian Mueller\nProgrammiert von: Richard Keil\nGetestet von: Richard Keil, Sebastian Mueller\n\n");
|
794 | getchar();
|
795 | continue;
|
796 |
|
797 | }
|
798 | if(Menue==5){
|
799 | break;
|
800 | }
|
801 |
|
802 | else{
|
803 | printf("Ung\x81ltige Eingabe!\a\n\n");
|
804 | }
|
805 |
|
806 | }while(Menue!=5);
|
807 |
|
808 |
|
809 |
|
810 | return 0;
|
811 | }
|