Senin, 25 Februari 2013

Game Tebak Buah dengan C++

Assalamu'alaikum... Wr... Wb... Ketemu lagi ni gan sama saya. Seperti biasa ni gan coding C++. Kali ini saya ingin berbagi kepada agan-agan sekalian sebuah game sederhana yang saya buat sendiri. Game ini merupakan game kedua yang saya buat sendiri gan. Semoga aja masih ada game ketiga, keempat, kelima dan seterusnya yang saya buat sendiri, hehehe :p
Nah langsung aja ni gan, gamenya bisa langsung di downlaod di sini, dan buat codingnya ni di bawah :


#include <iostream.h>
#include <conio.h>
#include <stdlib.h>

main()
{
char enter, tb1, tb2, tb3, tb4, tb5, tb6;
atas:
clrscr();
gotoxy(70,1);
cout<<">>>HS-32<<<";
gotoxy(1,1);
cout<<"\t\t---------------------------------------\n";
cout<<"\t\t========== Buah Apa Ya...??? ==========\n";
cout<<"\t\t---------------------------------------\n";

cout<<" Peraturan : \n";
cout<<"   1. Tekan Caps Lock terlebih dahulu sebelum memulai permainan.\n";
cout<<"   2. Tebaklah huruf-huruf yang akan membetuk sebuah kata nama buah.\n";
cout<<"   3. Jika anda 3 kali salah menebak, maka permainan selesai.\n\n";

cout<<"\t\tTekan [enter] untuk memulai permainan!";
enter=getche();
if(enter=='1')
{ exit(0);}
else
{
cout<<endl<<endl<<endl<<endl;
cout<<"\t\t\t_ _ _ _\n\n";
cout<<" Input huruf tebakan anda!\n";
cout<<" Tebakan 1 : ";
cin>>tb1;
if(tb1=='A')
{gotoxy(25,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='P')
{gotoxy(27,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='E')
{gotoxy(29,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='L')
{gotoxy(31,13);
cout<<"L";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}


gotoxy(1,17);
cout<<" Tebakan 2 : ";

cin>>tb2;
if(tb2=='A')
{gotoxy(25,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='P')
{gotoxy(27,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='E')
{gotoxy(29,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='L')
{gotoxy(31,13);
cout<<"L";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(20,16);
cout<<" Tebakan 3 : ";
cin>>tb3;
if(tb3=='A')
{gotoxy(25,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='P')
{gotoxy(27,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='E')
{gotoxy(29,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='L')
{gotoxy(31,13);
cout<<"L";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1!='A' && tb1!='P' && tb1!='E' && tb1!='L') &&
(tb2!='A' && tb2!='P' && tb2!='E' && tb2!='L') &&
(tb3!='A' && tb3!='P' && tb3!='E' && tb3!='L'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<\n";
cout<<"\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(20,17);
cout<<" Tebakan 4 : ";
cin>>tb4;
if(tb4=='A')
{gotoxy(25,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='P')
{gotoxy(27,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='E')
{gotoxy(29,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='L')
{gotoxy(31,13);
cout<<"L";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}
if ((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto mangga;}}
else if (((tb1!='A' && tb1!='P' && tb1!='E' && tb1!='L') &&
(tb2!='A' && tb2!='P' && tb2!='E' && tb2!='L') &&
(tb4!='A' && tb4!='P' && tb4!='E' && tb4!='L')) ||
((tb1!='A' && tb1!='P' && tb1!='E' && tb1!='L') &&
(tb4!='A' && tb4!='P' && tb4!='E' && tb4!='L') &&
(tb3!='A' && tb3!='P' && tb3!='E' && tb3!='L')) ||
((tb4!='A' && tb4!='P' && tb4!='E' && tb4!='L') &&
(tb2!='A' && tb2!='P' && tb2!='E' && tb2!='L') &&
(tb3!='A' && tb3!='P' && tb3!='E' && tb3!='L')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<\n";
cout<<"\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,16);
cout<<" Tebakan 5 : ";
cin>>tb5;
if(tb5=='A')
{gotoxy(25,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='P')
{gotoxy(27,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='E')
{gotoxy(29,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='L')
{gotoxy(31,13);
cout<<"L";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}
if (((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L')) ||
((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L')) ||
((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L')) ||
((tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto mangga;}}
else if (((tb1!='A' && tb1!='P' && tb1!='E' && tb1!='L') &&
(tb2!='A' && tb2!='P' && tb2!='E' && tb2!='L') &&
(tb5!='A' && tb5!='P' && tb5!='E' && tb5!='L')) ||
((tb1!='A' && tb1!='P' && tb1!='E' && tb1!='L') &&
(tb5!='A' && tb5!='P' && tb5!='E' && tb5!='L') &&
(tb3!='A' && tb3!='P' && tb3!='E' && tb3!='L')) ||
((tb5!='A' && tb5!='P' && tb5!='E' && tb5!='L') &&
(tb2!='A' && tb2!='P' && tb2!='E' && tb2!='L') &&
(tb3!='A' && tb3!='P' && tb3!='E' && tb3!='L')) ||
((tb1!='A' && tb1!='P' && tb1!='E' && tb1!='L') &&
(tb4!='A' && tb4!='P' && tb4!='E' && tb4!='L') &&
(tb5!='A' && tb5!='P' && tb5!='E' && tb5!='L')) ||
((tb2!='A' && tb2!='P' && tb2!='E' && tb2!='L') &&
(tb4!='A' && tb4!='P' && tb4!='E' && tb4!='L') &&
(tb5!='A' && tb5!='P' && tb5!='E' && tb5!='L')) ||
((tb3!='A' && tb3!='P' && tb3!='E' && tb3!='L') &&
(tb4!='A' && tb4!='P' && tb4!='E' && tb4!='L') &&
(tb5!='A' && tb5!='P' && tb5!='E' && tb5!='L')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<\n";
cout<<"\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,17);
cout<<" Tebakan 6 : ";
cin>>tb6;
if(tb6=='A')
{gotoxy(25,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='P')
{gotoxy(27,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='E')
{gotoxy(29,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='L')
{gotoxy(31,13);
cout<<"L";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}
if (((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L')) ||
((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L')) ||
((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L')) ||
((tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L')) ||
((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L')) ||
((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L')) ||
((tb1=='A' || tb1=='P' || tb1=='E' || tb1=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L')) ||
((tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L')) ||
((tb2=='A' || tb2=='P' || tb2=='E' || tb2=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L')) ||
((tb3=='A' || tb3=='P' || tb3=='E' || tb3=='L') &&
(tb4=='A' || tb4=='P' || tb4=='E' || tb4=='L') &&
(tb5=='A' || tb5=='P' || tb5=='E' || tb5=='L') &&
(tb6=='A' || tb6=='P' || tb6=='E' || tb6=='L')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto mangga;}}
else
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<\n";
cout<<"\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
}}}}

mangga:
clrscr();
cout<<"\t\t---------------------------------------\n";
cout<<"\t\t========== Buah Apa Ya...??? ==========\n";
cout<<"\t\t---------------------------------------\n";

cout<<" Peraturan : \n";
cout<<"   1. Tekan Caps Lock terlebih dahulu sebelum memulai permainan.\n";
cout<<"   2. Tebaklah huruf-huruf yang akan membetuk sebuah kata nama buah.\n";
cout<<"   3. Jika anda 3 kali salah menebak, maka permainan selesai.\n\n";

cout<<"\t\tTekan [enter] untuk memulai permainan!";
enter=getche();
if(enter=='1')
{ exit(0);}
else
{
cout<<endl<<endl<<endl<<endl;
cout<<"\t\t\t_ _ _ _ _ _\n\n";
cout<<" Input huruf tebakan anda!\n";
cout<<" Tebakan 1 : ";
cin>>tb1;
if(tb1=='M')
{gotoxy(25,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='N')
{gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(33,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(1,17);
cout<<" Tebakan 2 : ";
cin>>tb2;
if(tb2=='M')
{gotoxy(25,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='N')
{gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(33,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(20,16);
cout<<" Tebakan 3 : ";
cin>>tb3;
if(tb3=='M')
{gotoxy(25,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='N')
{gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(33,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1!='M' && tb1!='A' && tb1!='N' && tb1!='G') &&
(tb2!='M' && tb2!='A' && tb2!='N' && tb2!='G') &&
(tb3!='M' && tb3!='A' && tb3!='N' && tb3!='G'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(20,17);
cout<<" Tebakan 4 : ";
cin>>tb4;
if(tb4=='M')
{gotoxy(25,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='N')
{gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(33,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto nangka;}}
else if (((tb1!='M' && tb1!='A' && tb1!='N' && tb1!='G') &&
(tb2!='M' && tb2!='A' && tb2!='N' && tb2!='G') &&
(tb4!='M' && tb4!='A' && tb4!='N' && tb4!='G')) ||
((tb1!='M' && tb1!='A' && tb1!='N' && tb1!='G') &&
(tb4!='M' && tb4!='A' && tb4!='N' && tb4!='G') &&
(tb3!='M' && tb3!='A' && tb3!='N' && tb3!='G')) ||
((tb4!='M' && tb4!='A' && tb4!='N' && tb4!='G') &&
(tb2!='M' && tb2!='A' && tb2!='N' && tb2!='G') &&
(tb3!='M' && tb3!='A' && tb3!='N' && tb3!='G')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,16);
cout<<" Tebakan 5 : ";
cin>>tb5;
if(tb5=='M')
{gotoxy(25,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='N')
{gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(33,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if (((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G')) ||
((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G')) ||
((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G')) ||
((tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto nangka;}}
else if (((tb1!='M' && tb1!='A' && tb1!='N' && tb1!='G') &&
(tb2!='M' && tb2!='A' && tb2!='N' && tb2!='G') &&
(tb5!='M' && tb5!='A' && tb5!='N' && tb5!='G')) ||
((tb1!='M' && tb1!='A' && tb1!='N' && tb1!='G') &&
(tb5!='M' && tb5!='A' && tb5!='N' && tb5!='G') &&
(tb3!='M' && tb3!='A' && tb3!='N' && tb3!='G')) ||
((tb5!='M' && tb5!='A' && tb5!='N' && tb5!='G') &&
(tb2!='M' && tb2!='A' && tb2!='N' && tb2!='G') &&
(tb3!='M' && tb3!='A' && tb3!='N' && tb3!='G')) ||
((tb1!='M' && tb1!='A' && tb1!='N' && tb1!='G') &&
(tb4!='M' && tb4!='A' && tb4!='N' && tb4!='G') &&
(tb5!='M' && tb5!='A' && tb5!='N' && tb5!='G')) ||
((tb2!='M' && tb2!='A' && tb2!='N' && tb2!='G') &&
(tb4!='M' && tb4!='A' && tb4!='N' && tb4!='G') &&
(tb5!='M' && tb5!='A' && tb5!='N' && tb5!='G')) ||
((tb3!='M' && tb3!='A' && tb3!='N' && tb3!='G') &&
(tb4!='M' && tb4!='A' && tb4!='N' && tb4!='G') &&
(tb5!='M' && tb5!='A' && tb5!='N' && tb5!='G')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,17);
cout<<" Tebakan 6 : ";
cin>>tb6;
if(tb6=='M')
{gotoxy(25,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='N')
{gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(33,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if (((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G')) ||
((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G')) ||
((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G')) ||
((tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G')) ||
((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G')) ||
((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G')) ||
((tb1=='M' || tb1=='A' || tb1=='N' || tb1=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G')) ||
((tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G')) ||
((tb2=='M' || tb2=='A' || tb2=='N' || tb2=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G')) ||
((tb3=='M' || tb3=='A' || tb3=='N' || tb3=='G') &&
(tb4=='M' || tb4=='A' || tb4=='N' || tb4=='G') &&
(tb5=='M' || tb5=='A' || tb5=='N' || tb5=='G') &&
(tb6=='M' || tb6=='A' || tb6=='N' || tb6=='G')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto nangka;}}
else
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
}}}}

nangka:
clrscr();
cout<<"\t\t---------------------------------------\n";
cout<<"\t\t========== Buah Apa Ya...??? ==========\n";
cout<<"\t\t---------------------------------------\n";

cout<<" Peraturan : \n";
cout<<"   1. Tekan Caps Lock terlebih dahulu sebelum memulai permainan.\n";
cout<<"   2. Tebaklah huruf-huruf yang akan membetuk sebuah kata nama buah.\n";
cout<<"   3. Jika anda 3 kali salah menebak, maka permainan selesai.\n\n";

cout<<"\t\tTekan [enter] untuk memulai permainan!";
enter=getche();
if(enter=='1')
{ exit(0);}
else
{
cout<<endl<<endl<<endl<<endl;
cout<<"\t\t\t_ _ _ _ _ _\n\n";
cout<<" Input huruf tebakan anda!\n";
cout<<" Tebakan 1 : ";
cin>>tb1;
if(tb1=='N')
{gotoxy(25,13);
cout<<"N";
gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='K')
{gotoxy(33,13);
cout<<"K";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(1,17);
cout<<" Tebakan 2 : ";
cin>>tb2;
if(tb2=='N')
{gotoxy(25,13);
cout<<"N";
gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='K')
{gotoxy(33,13);
cout<<"K";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(20,16);
cout<<" Tebakan 3 : ";
cin>>tb3;
if(tb3=='N')
{gotoxy(25,13);
cout<<"N";
gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='K')
{gotoxy(33,13);
cout<<"K";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1!='N' && tb1!='A' && tb1!='G' && tb1!='K') &&
(tb2!='N' && tb2!='A' && tb2!='G' && tb2!='K') &&
(tb3!='N' && tb3!='A' && tb3!='G' && tb3!='K'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(20,17);
cout<<" Tebakan 4 : ";
cin>>tb4;
if(tb4=='N')
{gotoxy(25,13);
cout<<"N";
gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='K')
{gotoxy(33,13);
cout<<"K";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}
if ((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto tomat;}}
else if (((tb1!='N' && tb1!='A' && tb1!='G' && tb1!='K') &&
(tb2!='N' && tb2!='A' && tb2!='G' && tb2!='K') &&
(tb4!='N' && tb4!='A' && tb4!='G' && tb4!='K')) ||
((tb1!='N' && tb1!='A' && tb1!='G' && tb1!='K') &&
(tb4!='N' && tb4!='A' && tb4!='G' && tb4!='K') &&
(tb3!='N' && tb3!='A' && tb3!='G' && tb3!='K')) ||
((tb4!='N' && tb4!='A' && tb4!='G' && tb4!='K') &&
(tb2!='N' && tb2!='A' && tb2!='G' && tb2!='K') &&
(tb3!='N' && tb3!='A' && tb3!='G' && tb3!='K')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,16);
cout<<" Tebakan 5 : ";
cin>>tb5;
if(tb5=='N')
{gotoxy(25,13);
cout<<"N";
gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='K')
{gotoxy(33,13);
cout<<"K";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}
if (((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K')) ||
((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K')) ||
((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K')) ||
((tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto tomat;}}
else if (((tb1!='N' && tb1!='A' && tb1!='G' && tb1!='K') &&
(tb2!='N' && tb2!='A' && tb2!='G' && tb2!='K') &&
(tb5!='N' && tb5!='A' && tb5!='G' && tb5!='K')) ||
((tb1!='N' && tb1!='A' && tb1!='G' && tb1!='K') &&
(tb5!='N' && tb5!='A' && tb5!='G' && tb5!='K') &&
(tb3!='N' && tb3!='A' && tb3!='G' && tb3!='K')) ||
((tb5!='N' && tb5!='A' && tb5!='G' && tb5!='K') &&
(tb2!='N' && tb2!='A' && tb2!='G' && tb2!='K') &&
(tb3!='N' && tb3!='A' && tb3!='G' && tb3!='K')) ||
((tb1!='N' && tb1!='A' && tb1!='G' && tb1!='K') &&
(tb4!='N' && tb4!='A' && tb4!='G' && tb4!='K') &&
(tb5!='N' && tb5!='A' && tb5!='G' && tb5!='K')) ||
((tb2!='N' && tb2!='A' && tb2!='G' && tb2!='K') &&
(tb4!='N' && tb4!='A' && tb4!='G' && tb4!='K') &&
(tb5!='N' && tb5!='A' && tb5!='G' && tb5!='K')) ||
((tb3!='N' && tb3!='A' && tb3!='G' && tb3!='K') &&
(tb4!='N' && tb4!='A' && tb4!='G' && tb4!='K') &&
(tb5!='N' && tb5!='A' && tb5!='G' && tb5!='K')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,17);
cout<<" Tebakan 6 : ";
cin>>tb6;
if(tb6=='N')
{gotoxy(25,13);
cout<<"N";
gotoxy(29,13);
cout<<"N";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='A')
{gotoxy(27,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='G')
{gotoxy(31,13);
cout<<"G";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='K')
{gotoxy(33,13);
cout<<"K";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}
if (((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K')) ||
((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K')) ||
((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K')) ||
((tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K')) ||
((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K')) ||
((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K')) ||
((tb1=='N' || tb1=='A' || tb1=='G' || tb1=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K')) ||
((tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K')) ||
((tb2=='N' || tb2=='A' || tb2=='G' || tb2=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K')) ||
((tb3=='N' || tb3=='A' || tb3=='G' || tb3=='K') &&
(tb4=='N' || tb4=='A' || tb4=='G' || tb4=='K') &&
(tb5=='N' || tb5=='A' || tb5=='G' || tb5=='K') &&
(tb6=='N' || tb6=='A' || tb6=='G' || tb6=='K')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto tomat;}}
else
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
}}}}

tomat:
clrscr();
cout<<"\t\t---------------------------------------\n";
cout<<"\t\t========== Buah Apa Ya...??? ==========\n";
cout<<"\t\t---------------------------------------\n";

cout<<" Peraturan : \n";
cout<<"   1. Tekan Caps Lock terlebih dahulu sebelum memulai permainan.\n";
cout<<"   2. Tebaklah huruf-huruf yang akan membetuk sebuah kata nama buah.\n";
cout<<"   3. Jika anda 3 kali salah menebak, maka permainan selesai.\n\n";

cout<<"\t\tTekan [enter] untuk memulai permainan!";
enter=getche();
if(enter=='1')
{ exit(0);}
else
{
cout<<endl<<endl<<endl<<endl;
cout<<"\t\t\t_ _ _ _ _\n\n";
cout<<" Input huruf tebakan anda!\n";
cout<<" Tebakan 1 : ";
cin>>tb1;
if(tb1=='T')
{gotoxy(25,13);
cout<<"T";
gotoxy(33,13);
cout<<"T";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='O')
{gotoxy(27,13);
cout<<"O";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='M')
{gotoxy(29,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(1,17);
cout<<" Tebakan 2 : ";
cin>>tb2;
if(tb2=='T')
{gotoxy(25,13);
cout<<"T";
gotoxy(33,13);
cout<<"T";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='O')
{gotoxy(27,13);
cout<<"O";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='M')
{gotoxy(29,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(20,16);
cout<<" Tebakan 3 : ";
cin>>tb3;
if(tb3=='T')
{gotoxy(25,13);
cout<<"T";
gotoxy(33,13);
cout<<"T";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='O')
{gotoxy(27,13);
cout<<"O";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='M')
{gotoxy(29,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1!='T' && tb1!='O' && tb1!='M' && tb1!='A') &&
(tb2!='T' && tb2!='O' && tb2!='M' && tb2!='A') &&
(tb3!='T' && tb3!='O' && tb3!='M' && tb3!='A'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(20,17);
cout<<" Tebakan 4 : ";
cin>>tb4;
if(tb4=='T')
{gotoxy(25,13);
cout<<"T";
gotoxy(33,13);
cout<<"T";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='O')
{gotoxy(27,13);
cout<<"O";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='M')
{gotoxy(29,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto pepaya;}}
else if (((tb1!='T' && tb1!='O' && tb1!='M' && tb1!='A') &&
(tb2!='T' && tb2!='O' && tb2!='M' && tb2!='A') &&
(tb4!='T' && tb4!='O' && tb4!='M' && tb4!='A')) ||
((tb1!='T' && tb1!='O' && tb1!='M' && tb1!='A') &&
(tb4!='T' && tb4!='O' && tb4!='M' && tb4!='A') &&
(tb3!='T' && tb3!='O' && tb3!='M' && tb3!='A')) ||
((tb4!='T' && tb4!='O' && tb4!='M' && tb4!='A') &&
(tb2!='T' && tb2!='O' && tb2!='M' && tb2!='A') &&
(tb3!='T' && tb3!='O' && tb3!='M' && tb3!='A')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,16);
cout<<" Tebakan 5 : ";
cin>>tb5;
if(tb5=='T')
{gotoxy(25,13);
cout<<"T";
gotoxy(33,13);
cout<<"T";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='O')
{gotoxy(27,13);
cout<<"O";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='M')
{gotoxy(29,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if (((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A')) ||
((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A')) ||
((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A')) ||
((tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto pepaya;}}
else if (((tb1!='T' && tb1!='O' && tb1!='M' && tb1!='A') &&
(tb2!='T' && tb2!='O' && tb2!='M' && tb2!='A') &&
(tb5!='T' && tb5!='O' && tb5!='M' && tb5!='A')) ||
((tb1!='T' && tb1!='O' && tb1!='M' && tb1!='A') &&
(tb5!='T' && tb5!='O' && tb5!='M' && tb5!='A') &&
(tb3!='T' && tb3!='O' && tb3!='M' && tb3!='A')) ||
((tb5!='T' && tb5!='O' && tb5!='M' && tb5!='A') &&
(tb2!='T' && tb2!='O' && tb2!='M' && tb2!='A') &&
(tb3!='T' && tb3!='O' && tb3!='M' && tb3!='A')) ||
((tb1!='T' && tb1!='O' && tb1!='M' && tb1!='A') &&
(tb4!='T' && tb4!='O' && tb4!='M' && tb4!='A') &&
(tb5!='T' && tb5!='O' && tb5!='M' && tb5!='A')) ||
((tb2!='T' && tb2!='O' && tb2!='M' && tb2!='A') &&
(tb4!='T' && tb4!='O' && tb4!='M' && tb4!='A') &&
(tb5!='T' && tb5!='O' && tb5!='M' && tb5!='A')) ||
((tb3!='T' && tb3!='O' && tb3!='M' && tb3!='A') &&
(tb4!='T' && tb4!='O' && tb4!='M' && tb4!='A') &&
(tb5!='T' && tb5!='O' && tb5!='M' && tb5!='A')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,17);
cout<<" Tebakan 6 : ";
cin>>tb6;
if(tb6=='T')
{gotoxy(25,13);
cout<<"T";
gotoxy(33,13);
cout<<"T";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='O')
{gotoxy(27,13);
cout<<"O";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='M')
{gotoxy(29,13);
cout<<"M";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if (((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A')) ||
((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A')) ||
((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A')) ||
((tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A')) ||
((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A')) ||
((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A')) ||
((tb1=='T' || tb1=='O' || tb1=='M' || tb1=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A')) ||
((tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A')) ||
((tb2=='T' || tb2=='O' || tb2=='M' || tb2=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A')) ||
((tb3=='T' || tb3=='O' || tb3=='M' || tb3=='A') &&
(tb4=='T' || tb4=='O' || tb4=='M' || tb4=='A') &&
(tb5=='T' || tb5=='O' || tb5=='M' || tb5=='A') &&
(tb6=='T' || tb6=='O' || tb6=='M' || tb6=='A')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GOOD!!! <<<\n";
cout<<"\t   Tekan [enter] untuk ke tebakan selanjutnya!";
enter=getche();
if(enter=='1')
{exit(0);}
else
{goto pepaya;}}
else
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
}}}}

pepaya:
clrscr();
cout<<"\t\t---------------------------------------\n";
cout<<"\t\t========== Buah Apa Ya...??? ==========\n";
cout<<"\t\t---------------------------------------\n";

cout<<" Peraturan : \n";
cout<<"   1. Tekan Caps Lock terlebih dahulu sebelum memulai permainan.\n";
cout<<"   2. Tebaklah huruf-huruf yang akan membetuk sebuah kata nama buah.\n";
cout<<"   3. Jika anda 3 kali salah menebak, maka permainan selesai.\n\n";

cout<<"\t\tTekan [enter] untuk memulai permainan!";
enter=getche();
if(enter=='1')
{ exit(0);}
else
{
cout<<endl<<endl<<endl<<endl;
cout<<"\t\t\t_ _ _ _ _ _\n\n";
cout<<" Input huruf tebakan anda!\n";
cout<<" Tebakan 1 : ";
cin>>tb1;
if(tb1=='P')
{gotoxy(25,13);
cout<<"P";
gotoxy(29,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='E')
{gotoxy(27,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb1=='Y')
{gotoxy(33,13);
cout<<"Y";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(1,17);
cout<<" Tebakan 2 : ";
cin>>tb2;
if(tb2=='P')
{gotoxy(25,13);
cout<<"P";
gotoxy(29,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='E')
{gotoxy(27,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb2=='Y')
{gotoxy(33,13);
cout<<"Y";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

gotoxy(20,16);
cout<<" Tebakan 3 : ";
cin>>tb3;
if(tb3=='P')
{gotoxy(25,13);
cout<<"P";
gotoxy(29,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='E')
{gotoxy(27,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb3=='Y')
{gotoxy(33,13);
cout<<"Y";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1!='P' && tb1!='E' && tb1!='A' && tb1!='Y') &&
(tb2!='P' && tb2!='E' && tb2!='A' && tb2!='Y') &&
(tb3!='P' && tb3!='E' && tb3!='A' && tb3!='Y'))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(20,17);
cout<<" Tebakan 4 : ";
cin>>tb4;
if(tb4=='P')
{gotoxy(25,13);
cout<<"P";
gotoxy(29,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='E')
{gotoxy(27,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb4=='Y')
{gotoxy(33,13);
cout<<"Y";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if ((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y'))
{gotoxy(1,20);
cout<<"\t\t\t*** SELAMAT!!! ***\n";
cout<<"\t   ANDA BERHASIL MENYELESAIKAN PERMAINAN DENGAN BAIK!!!";}
else if (((tb1!='P' && tb1!='E' && tb1!='A' && tb1!='Y') &&
(tb2!='P' && tb2!='E' && tb2!='A' && tb2!='Y') &&
(tb4!='P' && tb4!='E' && tb4!='A' && tb4!='Y')) ||
((tb1!='P' && tb1!='E' && tb1!='A' && tb1!='Y') &&
(tb4!='P' && tb4!='E' && tb4!='A' && tb4!='Y') &&
(tb3!='P' && tb3!='E' && tb3!='A' && tb3!='Y')) ||
((tb4!='P' && tb4!='E' && tb4!='A' && tb4!='Y') &&
(tb2!='P' && tb2!='E' && tb2!='A' && tb2!='Y') &&
(tb3!='P' && tb3!='E' && tb3!='A' && tb3!='Y')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,16);
cout<<" Tebakan 5 : ";
cin>>tb5;
if(tb5=='P')
{gotoxy(25,13);
cout<<"P";
gotoxy(29,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='E')
{gotoxy(27,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb5=='Y')
{gotoxy(33,13);
cout<<"Y";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if (((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y')) ||
((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y')) ||
((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y')) ||
((tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y')))
{gotoxy(1,20);
cout<<"\t\t\t*** SELAMAT!!! ***\n";
cout<<"\t   ANDA BERHASIL MENYELESAIKAN PERMAINAN DENGAN BAIK!!!";}
else if (((tb1!='P' && tb1!='E' && tb1!='A' && tb1!='Y') &&
(tb2!='P' && tb2!='E' && tb2!='A' && tb2!='Y') &&
(tb5!='P' && tb5!='E' && tb5!='A' && tb5!='Y')) ||
((tb1!='P' && tb1!='E' && tb1!='A' && tb1!='Y') &&
(tb5!='P' && tb5!='E' && tb5!='A' && tb5!='Y') &&
(tb3!='P' && tb3!='E' && tb3!='A' && tb3!='Y')) ||
((tb5!='P' && tb5!='E' && tb5!='A' && tb5!='Y') &&
(tb2!='P' && tb2!='E' && tb2!='A' && tb2!='Y') &&
(tb3!='P' && tb3!='E' && tb3!='A' && tb3!='Y')) ||
((tb1!='P' && tb1!='E' && tb1!='A' && tb1!='Y') &&
(tb4!='P' && tb4!='E' && tb4!='A' && tb4!='Y') &&
(tb5!='P' && tb5!='E' && tb5!='A' && tb5!='Y')) ||
((tb2!='P' && tb2!='E' && tb2!='A' && tb2!='Y') &&
(tb4!='P' && tb4!='E' && tb4!='A' && tb4!='Y') &&
(tb5!='P' && tb5!='E' && tb5!='A' && tb5!='Y')) ||
((tb3!='P' && tb3!='E' && tb3!='A' && tb3!='Y') &&
(tb4!='P' && tb4!='E' && tb4!='A' && tb4!='Y') &&
(tb5!='P' && tb5!='E' && tb5!='A' && tb5!='Y')))
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(39,17);
cout<<" Tebakan 6 : ";
cin>>tb6;
if(tb6=='P')
{gotoxy(25,13);
cout<<"P";
gotoxy(29,13);
cout<<"P";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='E')
{gotoxy(27,13);
cout<<"E";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='A')
{gotoxy(31,13);
cout<<"A";
gotoxy(35,13);
cout<<"A";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else if (tb6=='Y')
{gotoxy(33,13);
cout<<"Y";
gotoxy(55,13);
cout<<"TEBAKAN BENAR!!!";}
else
{gotoxy(55,13);
cout<<"TEBAKAN SALAH!!!";}

if (((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y')) ||
((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y')) ||
((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y')) ||
((tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y')) ||
((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y')) ||
((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y')) ||
((tb1=='P' || tb1=='E' || tb1=='A' || tb1=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y')) ||
((tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y')) ||
((tb2=='P' || tb2=='E' || tb2=='A' || tb2=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y')) ||
((tb3=='P' || tb3=='E' || tb3=='A' || tb3=='Y') &&
(tb4=='P' || tb4=='E' || tb4=='A' || tb4=='Y') &&
(tb5=='P' || tb5=='E' || tb5=='A' || tb5=='Y') &&
(tb6=='P' || tb6=='E' || tb6=='A' || tb6=='Y')))
{gotoxy(1,20);
cout<<"\t\t\t*** SELAMAT!!! ***\n";
cout<<"\t   ANDA BERHASIL MENYELESAIKAN PERMAINAN DENGAN BAIK!!!";}
else
{gotoxy(1,20);
cout<<"\t\t\t>>> GAME OVER!!! <<<";
cout<<"\n\tTekan [1] untuk main lagi, tekan [2] untuk keluar dari permainan!";
enter=getche();
if(enter=='1')
{goto atas;}
else
{exit(0);}}
}}}}
getch();
}

Sekian dulu gan buat kali ini, seperti  biasa kritik dan sarannya langsung aja ya gan di kotak komentar :)

Tidak ada komentar:

Posting Komentar