You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.9 KiB
C++
71 lines
1.9 KiB
C++
2 years ago
|
//---------------------------------------------------------------------------
|
||
|
#include <iostream.h>
|
||
|
#include <conio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
|
||
|
main ()
|
||
|
{ void exit(int status);
|
||
|
marke1: clrscr() ;
|
||
|
char i ;
|
||
|
float kugelschacht, leerschacht, zwangswahl;
|
||
|
kugelschacht=random(8);
|
||
|
zwangswahl=6;
|
||
|
if (kugelschacht==0)
|
||
|
{
|
||
|
goto marke1;
|
||
|
}
|
||
|
cout << "!Russisches Roulette! (c)2008"<<endl;
|
||
|
cout << "Die Kugel befindet sich in Einem von 8 Schaechten"<<endl;
|
||
|
cout << "Du must noch: " << zwangswahl <<" mal einen Kugelschacht auswaehlen!" << endl;
|
||
|
marke2:if (zwangswahl==0)
|
||
|
{
|
||
|
cout <<"Glueckspilz! Die Kugel war im Schacht " << kugelschacht<< " . Moechtest Du es nocheinmal wagen? (j/n)"<<endl;
|
||
|
cin >> i ;
|
||
|
|
||
|
if(i=='j'||i=='J')
|
||
|
{
|
||
|
goto marke1;
|
||
|
}
|
||
|
else _exit(0);
|
||
|
}
|
||
|
else
|
||
|
cout << "Waehle deinen naechste Schacht !" << endl;
|
||
|
cin >> leerschacht;
|
||
|
if (leerschacht==0)
|
||
|
{
|
||
|
cout<<(char)7;
|
||
|
goto marke2;
|
||
|
}
|
||
|
if (leerschacht==kugelschacht)
|
||
|
{
|
||
|
cout << "Du legst an!"<<endl;
|
||
|
getch();
|
||
|
cout << "Und drueckst ab, wenn du es wagst ! "<<endl;
|
||
|
getch();
|
||
|
cout<<(char)7<<"BAAAANNNGG"<<endl;
|
||
|
cout<<"Du musstest dein Pech mit deinem Leben bezahlen! "<<endl;
|
||
|
cout<<"Moechtest du es noch einmal wagen? (j/n)"<<endl;
|
||
|
cin >> i ;
|
||
|
if(i=='j'||i=='J')
|
||
|
{
|
||
|
goto marke1;
|
||
|
}
|
||
|
else _exit(0);
|
||
|
}
|
||
|
else if (leerschacht!=kugelschacht)
|
||
|
{
|
||
|
cout << "Du legst an! " <<endl;
|
||
|
getch();
|
||
|
cout << "Und drueckst ab, wenn du es wagst !"<<endl;
|
||
|
getch();
|
||
|
cout << "Clack!" <<endl;
|
||
|
cout << "Du hast glueck gehabt !"<<endl;
|
||
|
zwangswahl-=1;
|
||
|
cout << " Du must noch : " <<zwangswahl<< " mal waehlen!" << endl;
|
||
|
goto marke2;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|