Assalamu'alaikum Wr... Wb... Salam blogger semuanya!!!
Sebelumnya maaf ni gan lama gak update. Pada kesempatan kali ini saya akan berbagi sebuah game sederhana kepada agan-agan semua. Ini merupakan game pertama yang pernah saya buat gan, dulu-dulunya cuma bisa menikmati serunya bermain game tanpa bisa membuat, tapi sekarang saya sudah bisa membuat game sendiri walaupun game yang saya buat ini sangat sederhana. Mungkin agan-agan sudah tidak asing lagi dengan game yang satu ini, dan bahkan mungkin agan udah pada pernah main game ini dalam bentuk lain. Langsung aja ni gan, game-nya bisa di download di sini, dan untuk coding C++ nya ni di bawah :
#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
main()
{
char abc, a, b, c, d, e, f, g, h, i;
atas:
clrscr();
gotoxy(70,1);
cout<<">>>HS-32<<<";
gotoxy(10,2);
cout<<"x x ooo";
gotoxy(10,3);
cout<<" x x o o";
gotoxy(10,4);
cout<<" x o o";
gotoxy(10,5);
cout<<" x x o o";
gotoxy(10,6);
cout<<"x x ooo";
gotoxy(58,2);
cout<<"o o xxx";
gotoxy(58,3);
cout<<" o o x x";
gotoxy(58,4);
cout<<" o x x";
gotoxy(58,5);
cout<<" o o x x";
gotoxy(58,6);
cout<<"o o xxx";
gotoxy(33,1);
cout<<"-------------";
gotoxy(33,2);
cout<<"| 1 | 2 | 3 |";
gotoxy(33,3);
cout<<"----+---+----";
gotoxy(33,4);
cout<<"| 4 | 5 | 6 |";
gotoxy(33,5);
cout<<"----+---+----";
gotoxy(33,6);
cout<<"| 7 | 8 | 9 |";
gotoxy(33,7);
cout<<"-------------";
gotoxy(1,9);
cout<<"\t\t Tekan [enter] untuk memulai permainan!";
abc=getche();
if (abc=='1')
{exit(0);}
else
{
cout<<endl<<endl;
cout<<"\t\t\t\t-------------\n";
cout<<"\t\t\t\t| | | |\n";
cout<<"\t\t\t\t----+---+----\n";
cout<<"\t\t\t\t| | | |\n";
cout<<"\t\t\t\t----+---+----\n";
cout<<"\t\t\t\t| | | |\n";
cout<<"\t\t\t\t-------------\n\n";
cout<<" Pilih angka antara 1 sampai 9 : \n";
cout<<" Player 1 : ";
cin>>a;
if (a=='1')
{gotoxy(35,12);
cout<<"X";}
else if (a=='2')
{gotoxy(39,12);
cout<<"X";}
else if (a=='3')
{gotoxy(43,12);
cout<<"X";}
else if (a=='4')
{gotoxy(35,14);
cout<<"X";}
else if (a=='5')
{gotoxy(39,14);
cout<<"X";}
else if (a=='6')
{gotoxy(43,14);
cout<<"X";}
else if (a=='7')
{gotoxy(35,16);
cout<<"X";}
else if (a=='8')
{gotoxy(39,16);
cout<<"X";}
else
{gotoxy(43,16);
cout<<"X";}
gotoxy(1,21);
cout<<" Player 2 : ";
cin>>b;
if (b=='1')
{gotoxy(35,12);
cout<<"O";}
else if (b=='2')
{gotoxy(39,12);
cout<<"O";}
else if (b=='3')
{gotoxy(43,12);
cout<<"O";}
else if (b=='4')
{gotoxy(35,14);
cout<<"O";}
else if (b=='5')
{gotoxy(39,14);
cout<<"O";}
else if (b=='6')
{gotoxy(43,14);
cout<<"O";}
else if (b=='7')
{gotoxy(35,16);
cout<<"O";}
else if (b=='8')
{gotoxy(39,16);
cout<<"O";}
else
{gotoxy(43,16);
cout<<"O";}
gotoxy(16,20);
cout<<" Player 1 : ";
cin>>c;
if (c=='1')
{gotoxy(35,12);
cout<<"X";}
else if (c=='2')
{gotoxy(39,12);
cout<<"X";}
else if (c=='3')
{gotoxy(43,12);
cout<<"X";}
else if (c=='4')
{gotoxy(35,14);
cout<<"X";}
else if (c=='5')
{gotoxy(39,14);
cout<<"X";}
else if (c=='6')
{gotoxy(43,14);
cout<<"X";}
else if (c=='7')
{gotoxy(35,16);
cout<<"X";}
else if (c=='8')
{gotoxy(39,16);
cout<<"X";}
else
{gotoxy(43,16);
cout<<"X";}
gotoxy(16,21);
cout<<" Player 2 : ";
cin>>d;
if (d=='1')
{gotoxy(35,12);
cout<<"O";}
else if (d=='2')
{gotoxy(39,12);
cout<<"O";}
else if (d=='3')
{gotoxy(43,12);
cout<<"O";}
else if (d=='4')
{gotoxy(35,14);
cout<<"O";}
else if (d=='5')
{gotoxy(39,14);
cout<<"O";}
else if (d=='6')
{gotoxy(43,14);
cout<<"O";}
else if (d=='7')
{gotoxy(35,16);
cout<<"O";}
else if (d=='8')
{gotoxy(39,16);
cout<<"O";}
else
{gotoxy(43,16);
cout<<"O";}
gotoxy(31,20);
cout<<" Player 1 : ";
cin>>e;
if (e=='1')
{gotoxy(35,12);
cout<<"X";}
else if (e=='2')
{gotoxy(39,12);
cout<<"X";}
else if (e=='3')
{gotoxy(43,12);
cout<<"X";}
else if (e=='4')
{gotoxy(35,14);
cout<<"X";}
else if (e=='5')
{gotoxy(39,14);
cout<<"X";}
else if (e=='6')
{gotoxy(43,14);
cout<<"X";}
else if (e=='7')
{gotoxy(35,16);
cout<<"X";}
else if (e=='8')
{gotoxy(39,16);
cout<<"X";}
else
{gotoxy(43,16);
cout<<"X";}
if (((a=='1' || a=='2' || a=='3') && (c=='1' || c=='2' || c=='3') && (e=='1' || e=='2' || e=='3')) ||
((a=='4' || a=='5' || a=='6') && (c=='4' || c=='5' || c=='6') && (e=='4' || e=='5' || e=='6')) ||
((a=='7' || a=='8' || a=='9') && (c=='7' || c=='8' || c=='9') && (e=='7' || e=='8' || e=='9')) ||
((a=='1' || a=='4' || a=='7') && (c=='1' || c=='4' || c=='7') && (e=='1' || e=='4' || e=='7')) ||
((a=='2' || a=='5' || a=='8') && (c=='2' || c=='5' || c=='8') && (e=='2' || e=='5' || e=='8')) ||
((a=='3' || a=='6' || a=='9') && (c=='3' || c=='6' || c=='9') && (e=='3' || e=='6' || e=='9')) ||
((a=='1' || a=='5' || a=='9') && (c=='1' || c=='5' || c=='9') && (e=='1' || e=='5' || e=='9')) ||
((a=='3' || a=='5' || a=='7') && (c=='3' || c=='5' || c=='7') && (e=='3' || e=='5' || e=='7')))
{gotoxy(1,23);
cout<<"\t\t\tPlayer 1 Menang!!!\n";
cout<<"Tekan [1] untuk main lagi, dan tekan [2] untuk keluar dari permainan!";
cin>>abc;
if (abc=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(31,21);
cout<<" Player 2 : ";
cin>>f;
if (f=='1')
{gotoxy(35,12);
cout<<"O";}
else if (f=='2')
{gotoxy(39,12);
cout<<"O";}
else if (f=='3')
{gotoxy(43,12);
cout<<"O";}
else if (f=='4')
{gotoxy(35,14);
cout<<"O";}
else if (f=='5')
{gotoxy(39,14);
cout<<"O";}
else if (f=='6')
{gotoxy(43,14);
cout<<"O";}
else if (f=='7')
{gotoxy(35,16);
cout<<"O";}
else if (f=='8')
{gotoxy(39,16);
cout<<"O";}
else
{gotoxy(43,16);
cout<<"O";}
if (((b=='1' || b=='2' || b=='3') && (d=='1' || d=='2' || d=='3') && (f=='1' || f=='2' || f=='3')) ||
((b=='4' || b=='5' || b=='6') && (d=='4' || d=='5' || d=='6') && (f=='4' || f=='5' || f=='6')) ||
((b=='7' || b=='8' || b=='9') && (d=='7' || d=='8' || d=='9') && (f=='7' || f=='8' || f=='9')) ||
((b=='1' || b=='4' || b=='7') && (d=='1' || d=='4' || d=='7') && (f=='1' || f=='4' || f=='7')) ||
((b=='2' || b=='5' || b=='8') && (d=='2' || d=='5' || d=='8') && (f=='2' || f=='5' || f=='8')) ||
((b=='3' || b=='6' || b=='9') && (d=='3' || d=='6' || d=='9') && (f=='3' || f=='6' || f=='9')) ||
((b=='1' || b=='5' || b=='9') && (d=='1' || d=='5' || d=='9') && (f=='1' || f=='5' || f=='9')) ||
((b=='3' || b=='5' || b=='7') && (d=='3' || d=='5' || d=='7') && (f=='3' || f=='5' || f=='7')))
{gotoxy(1,23);
cout<<"\t\t\tPlayer 2 Menang!!!\n";
cout<<"Tekan [1] untuk main lagi, dan tekan [2] untuk keluar dari permainan!";
cin>>abc;
if (abc=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(46,20);
cout<<" Player 1 : ";
cin>>g;
if (g=='1')
{gotoxy(35,12);
cout<<"X";}
else if (g=='2')
{gotoxy(39,12);
cout<<"X";}
else if (g=='3')
{gotoxy(43,12);
cout<<"X";}
else if (g=='4')
{gotoxy(35,14);
cout<<"X";}
else if (g=='5')
{gotoxy(39,14);
cout<<"X";}
else if (g=='6')
{gotoxy(43,14);
cout<<"X";}
else if (g=='7')
{gotoxy(35,16);
cout<<"X";}
else if (g=='8')
{gotoxy(39,16);
cout<<"X";}
else
{gotoxy(43,16);
cout<<"X";}
if (((a=='1' || a=='2' || a=='3') && (c=='1' || c=='2' || c=='3') && (g=='1' || g=='2' || g=='3')) ||
((a=='4' || a=='5' || a=='6') && (c=='4' || c=='5' || c=='6') && (g=='4' || g=='5' || g=='6')) ||
((a=='7' || a=='8' || a=='9') && (c=='7' || c=='8' || c=='9') && (g=='7' || g=='8' || g=='9')) ||
((a=='1' || a=='4' || a=='7') && (c=='1' || c=='4' || c=='7') && (g=='1' || g=='4' || g=='7')) ||
((a=='2' || a=='5' || a=='8') && (c=='2' || c=='5' || c=='8') && (g=='2' || g=='5' || g=='8')) ||
((a=='3' || a=='6' || a=='9') && (c=='3' || c=='6' || c=='9') && (g=='3' || g=='6' || g=='9')) ||
((a=='1' || a=='5' || a=='9') && (c=='1' || c=='5' || c=='9') && (g=='1' || g=='5' || g=='9')) ||
((a=='3' || a=='5' || a=='7') && (c=='3' || c=='5' || c=='7') && (g=='3' || g=='5' || g=='7')) ||
((a=='1' || a=='2' || a=='3') && (g=='1' || g=='2' || g=='3') && (e=='1' || e=='2' || e=='3')) ||
((a=='4' || a=='5' || a=='6') && (g=='4' || g=='5' || g=='6') && (e=='4' || e=='5' || e=='6')) ||
((a=='7' || a=='8' || a=='9') && (g=='7' || g=='8' || g=='9') && (e=='7' || e=='8' || e=='9')) ||
((a=='1' || a=='4' || a=='7') && (g=='1' || g=='4' || g=='7') && (e=='1' || e=='4' || e=='7')) ||
((a=='2' || a=='5' || a=='8') && (g=='2' || g=='5' || g=='8') && (e=='2' || e=='5' || e=='8')) ||
((a=='3' || a=='6' || a=='9') && (g=='3' || g=='6' || g=='9') && (e=='3' || e=='6' || e=='9')) ||
((a=='1' || a=='5' || a=='9') && (g=='1' || g=='5' || g=='9') && (e=='1' || e=='5' || e=='9')) ||
((a=='3' || a=='5' || a=='7') && (g=='3' || g=='5' || g=='7') && (e=='3' || e=='5' || e=='7')) ||
((g=='1' || g=='2' || g=='3') && (c=='1' || c=='2' || c=='3') && (e=='1' || e=='2' || e=='3')) ||
((g=='4' || g=='5' || g=='6') && (c=='4' || c=='5' || c=='6') && (e=='4' || e=='5' || e=='6')) ||
((g=='7' || g=='8' || g=='9') && (c=='7' || c=='8' || c=='9') && (e=='7' || e=='8' || e=='9')) ||
((g=='1' || g=='4' || g=='7') && (c=='1' || c=='4' || c=='7') && (e=='1' || e=='4' || e=='7')) ||
((g=='2' || g=='5' || g=='8') && (c=='2' || c=='5' || c=='8') && (e=='2' || e=='5' || e=='8')) ||
((g=='3' || g=='6' || g=='9') && (c=='3' || c=='6' || c=='9') && (e=='3' || e=='6' || e=='9')) ||
((g=='1' || g=='5' || g=='9') && (c=='1' || c=='5' || c=='9') && (e=='1' || e=='5' || e=='9')) ||
((g=='3' || g=='5' || g=='7') && (c=='3' || c=='5' || c=='7') && (e=='3' || e=='5' || e=='7')))
{gotoxy(1,23);
cout<<"\t\t\tPlayer 1 Menang!!!\n";
cout<<"Tekan [1] untuk main lagi, dan tekan [2] untuk keluar dari permainan!";
cin>>abc;
if (abc=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(46,21);
cout<<" Player 2 : ";
cin>>h;
if (h=='1')
{gotoxy(35,12);
cout<<"O";}
else if (h=='2')
{gotoxy(39,12);
cout<<"O";}
else if (h=='3')
{gotoxy(43,12);
cout<<"O";}
else if (h=='4')
{gotoxy(35,14);
cout<<"O";}
else if (h=='5')
{gotoxy(39,14);
cout<<"O";}
else if (h=='6')
{gotoxy(43,14);
cout<<"O";}
else if (h=='7')
{gotoxy(35,16);
cout<<"O";}
else if (h=='8')
{gotoxy(39,16);
cout<<"O";}
else
{gotoxy(43,16);
cout<<"O";}
if (((b=='1' || b=='2' || b=='3') && (d=='1' || d=='2' || d=='3') && (h=='1' || h=='2' || h=='3')) ||
((b=='4' || b=='5' || b=='6') && (d=='4' || d=='5' || d=='6') && (h=='4' || h=='5' || h=='6')) ||
((b=='7' || b=='8' || b=='9') && (d=='7' || d=='8' || d=='9') && (h=='7' || h=='8' || h=='9')) ||
((b=='1' || b=='4' || b=='7') && (d=='1' || d=='4' || d=='7') && (h=='1' || h=='4' || h=='7')) ||
((b=='2' || b=='5' || b=='8') && (d=='2' || d=='5' || d=='8') && (h=='2' || h=='5' || h=='8')) ||
((b=='3' || b=='6' || b=='9') && (d=='3' || d=='6' || d=='9') && (h=='3' || h=='6' || h=='9')) ||
((b=='1' || b=='5' || b=='9') && (d=='1' || d=='5' || d=='9') && (h=='1' || h=='5' || h=='9')) ||
((b=='3' || b=='5' || b=='7') && (d=='3' || d=='5' || d=='7') && (h=='3' || h=='5' || h=='7')) ||
((b=='1' || b=='2' || b=='3') && (h=='1' || h=='2' || h=='3') && (f=='1' || f=='2' || f=='3')) ||
((b=='4' || b=='5' || b=='6') && (h=='4' || h=='5' || h=='6') && (f=='4' || f=='5' || f=='6')) ||
((b=='7' || b=='8' || b=='9') && (h=='7' || h=='8' || h=='9') && (f=='7' || f=='8' || f=='9')) ||
((b=='1' || b=='4' || b=='7') && (h=='1' || h=='4' || h=='7') && (f=='1' || f=='4' || f=='7')) ||
((b=='2' || b=='5' || b=='8') && (h=='2' || h=='5' || h=='8') && (f=='2' || f=='5' || f=='8')) ||
((b=='3' || b=='6' || b=='9') && (h=='3' || h=='6' || h=='9') && (f=='3' || f=='6' || f=='9')) ||
((b=='1' || b=='5' || b=='9') && (h=='1' || h=='5' || h=='9') && (f=='1' || f=='5' || f=='9')) ||
((b=='3' || b=='5' || b=='7') && (h=='3' || h=='5' || h=='7') && (f=='3' || f=='5' || f=='7')) ||
((h=='1' || h=='2' || h=='3') && (d=='1' || d=='2' || d=='3') && (f=='1' || f=='2' || f=='3')) ||
((h=='4' || h=='5' || h=='6') && (d=='4' || d=='5' || d=='6') && (f=='4' || f=='5' || f=='6')) ||
((h=='7' || h=='8' || h=='9') && (d=='7' || d=='8' || d=='9') && (f=='7' || f=='8' || f=='9')) ||
((h=='1' || h=='4' || h=='7') && (d=='1' || d=='4' || d=='7') && (f=='1' || f=='4' || f=='7')) ||
((h=='2' || h=='5' || h=='8') && (d=='2' || d=='5' || d=='8') && (f=='2' || f=='5' || f=='8')) ||
((h=='3' || h=='6' || h=='9') && (d=='3' || d=='6' || d=='9') && (f=='3' || f=='6' || f=='9')) ||
((h=='1' || h=='5' || h=='9') && (d=='1' || d=='5' || d=='9') && (f=='1' || f=='5' || f=='9')) ||
((h=='3' || h=='5' || h=='7') && (d=='3' || d=='5' || d=='7') && (f=='3' || f=='5' || f=='7')))
{gotoxy(1,23);
cout<<"\t\t\tPlayer 2 Menang!!!\n";
cout<<"Tekan [1] untuk main lagi, dan tekan [2] untuk keluar dari permainan!";
cin>>abc;
if (abc=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(61,20);
cout<<" Player 1 : ";
cin>>i;
if (i=='1')
{gotoxy(35,12);
cout<<"X";}
else if (i=='2')
{gotoxy(39,12);
cout<<"X";}
else if (i=='3')
{gotoxy(43,12);
cout<<"X";}
else if (i=='4')
{gotoxy(35,14);
cout<<"X";}
else if (i=='5')
{gotoxy(39,14);
cout<<"X";}
else if (i=='6')
{gotoxy(43,14);
cout<<"X";}
else if (i=='7')
{gotoxy(35,16);
cout<<"X";}
else if (i=='8')
{gotoxy(39,16);
cout<<"X";}
else
{gotoxy(43,16);
cout<<"X";}
if (((a=='1' || a=='2' || a=='3') && (c=='1' || c=='2' || c=='3') && (i=='1' || i=='2' || i=='3')) ||
((a=='4' || a=='5' || a=='6') && (c=='4' || c=='5' || c=='6') && (i=='4' || i=='5' || i=='6')) ||
((a=='7' || a=='8' || a=='9') && (c=='7' || c=='8' || c=='9') && (i=='7' || i=='8' || i=='9')) ||
((a=='1' || a=='4' || a=='7') && (c=='1' || c=='4' || c=='7') && (i=='1' || i=='4' || i=='7')) ||
((a=='2' || a=='5' || a=='8') && (c=='2' || c=='5' || c=='8') && (i=='2' || i=='5' || i=='8')) ||
((a=='3' || a=='6' || a=='9') && (c=='3' || c=='6' || c=='9') && (i=='3' || i=='6' || i=='9')) ||
((a=='1' || a=='5' || a=='9') && (c=='1' || c=='5' || c=='9') && (i=='1' || i=='5' || i=='9')) ||
((a=='3' || a=='5' || a=='7') && (c=='3' || c=='5' || c=='7') && (i=='3' || i=='5' || i=='7')) ||
((a=='1' || a=='2' || a=='3') && (i=='1' || i=='2' || i=='3') && (e=='1' || e=='2' || e=='3')) ||
((a=='4' || a=='5' || a=='6') && (i=='4' || i=='5' || i=='6') && (e=='4' || e=='5' || e=='6')) ||
((a=='7' || a=='8' || a=='9') && (i=='7' || i=='8' || i=='9') && (e=='7' || e=='8' || e=='9')) ||
((a=='1' || a=='4' || a=='7') && (i=='1' || i=='4' || i=='7') && (e=='1' || e=='4' || e=='7')) ||
((a=='2' || a=='5' || a=='8') && (i=='2' || i=='5' || i=='8') && (e=='2' || e=='5' || e=='8')) ||
((a=='3' || a=='6' || a=='9') && (i=='3' || i=='6' || i=='9') && (e=='3' || e=='6' || e=='9')) ||
((a=='1' || a=='5' || a=='9') && (i=='1' || i=='5' || i=='9') && (e=='1' || e=='5' || e=='9')) ||
((a=='3' || a=='5' || a=='7') && (i=='3' || i=='5' || i=='7') && (e=='3' || e=='5' || e=='7')) ||
((i=='1' || i=='2' || i=='3') && (c=='1' || c=='2' || c=='3') && (e=='1' || e=='2' || e=='3')) ||
((i=='4' || i=='5' || i=='6') && (c=='4' || c=='5' || c=='6') && (e=='4' || e=='5' || e=='6')) ||
((i=='7' || i=='8' || i=='9') && (c=='7' || c=='8' || c=='9') && (e=='7' || e=='8' || e=='9')) ||
((i=='1' || i=='4' || i=='7') && (c=='1' || c=='4' || c=='7') && (e=='1' || e=='4' || e=='7')) ||
((i=='2' || i=='5' || i=='8') && (c=='2' || c=='5' || c=='8') && (e=='2' || e=='5' || e=='8')) ||
((i=='3' || i=='6' || i=='9') && (c=='3' || c=='6' || c=='9') && (e=='3' || e=='6' || e=='9')) ||
((i=='1' || i=='5' || i=='9') && (c=='1' || c=='5' || c=='9') && (e=='1' || e=='5' || e=='9')) ||
((i=='3' || i=='5' || i=='7') && (c=='3' || c=='5' || c=='7') && (e=='3' || e=='5' || e=='7')) ||
((g=='1' || g=='2' || g=='3') && (c=='1' || c=='2' || c=='3') && (i=='1' || i=='2' || i=='3')) ||
((g=='4' || g=='5' || g=='6') && (c=='4' || c=='5' || c=='6') && (i=='4' || i=='5' || i=='6')) ||
((g=='7' || g=='8' || g=='9') && (c=='7' || c=='8' || c=='9') && (i=='7' || i=='8' || i=='9')) ||
((g=='1' || g=='4' || g=='7') && (c=='1' || c=='4' || c=='7') && (i=='1' || i=='4' || i=='7')) ||
((g=='2' || g=='5' || g=='8') && (c=='2' || c=='5' || c=='8') && (i=='2' || i=='5' || i=='8')) ||
((g=='3' || g=='6' || g=='9') && (c=='3' || c=='6' || c=='9') && (i=='3' || i=='6' || i=='9')) ||
((g=='1' || g=='5' || g=='9') && (c=='1' || c=='5' || c=='9') && (i=='1' || i=='5' || i=='9')) ||
((g=='3' || g=='5' || g=='7') && (c=='3' || c=='5' || c=='7') && (i=='3' || i=='5' || i=='7')) ||
((g=='1' || g=='2' || g=='3') && (i=='1' || i=='2' || i=='3') && (e=='1' || e=='2' || e=='3')) ||
((g=='4' || g=='5' || g=='6') && (i=='4' || i=='5' || i=='6') && (e=='4' || e=='5' || e=='6')) ||
((g=='7' || g=='8' || g=='9') && (i=='7' || i=='8' || i=='9') && (e=='7' || e=='8' || e=='9')) ||
((g=='1' || g=='4' || g=='7') && (i=='1' || i=='4' || i=='7') && (e=='1' || e=='4' || e=='7')) ||
((g=='2' || g=='5' || g=='8') && (i=='2' || i=='5' || i=='8') && (e=='2' || e=='5' || e=='8')) ||
((g=='3' || g=='6' || g=='9') && (i=='3' || i=='6' || i=='9') && (e=='3' || e=='6' || e=='9')) ||
((g=='1' || g=='5' || g=='9') && (i=='1' || i=='5' || i=='9') && (e=='1' || e=='5' || e=='9')) ||
((g=='3' || g=='5' || g=='7') && (i=='3' || i=='5' || i=='7') && (e=='3' || e=='5' || e=='7')) ||
((a=='1' || a=='2' || a=='3') && (g=='1' || g=='2' || g=='3') && (i=='1' || i=='2' || i=='3')) ||
((a=='4' || a=='5' || a=='6') && (g=='4' || g=='5' || g=='6') && (i=='4' || i=='5' || i=='6')) ||
((a=='7' || a=='8' || a=='9') && (g=='7' || g=='8' || g=='9') && (i=='7' || i=='8' || i=='9')) ||
((a=='1' || a=='4' || a=='7') && (g=='1' || g=='4' || g=='7') && (i=='1' || i=='4' || i=='7')) ||
((a=='2' || a=='5' || a=='8') && (g=='2' || g=='5' || g=='8') && (i=='2' || i=='5' || i=='8')) ||
((a=='3' || a=='6' || a=='9') && (g=='3' || g=='6' || g=='9') && (i=='3' || i=='6' || i=='9')) ||
((a=='1' || a=='5' || a=='9') && (g=='1' || g=='5' || g=='9') && (i=='1' || i=='5' || i=='9')) ||
((a=='3' || a=='5' || a=='7') && (g=='3' || g=='5' || g=='7') && (i=='3' || i=='5' || i=='7')))
{gotoxy(1,23);
cout<<"\t\t\tPlayer 1 Menang!!!\n";
cout<<"Tekan [1] untuk main lagi, dan tekan [2] untuk keluar dari permainan!";
cin>>abc;
if (abc=='1')
{goto atas;}
else
{exit(0);}}
else
{
gotoxy(1,23);
cout<<"\t\t\tPermainan Imbang!!!\n";
cout<<"Tekan [1] untuk main lagi, dan tekan [2] untuk keluar dari permainan!";
cin>>abc;
if (abc=='1')
{goto atas;}
else
{exit(0);}}}}}}}
getch();
}
Sekian game sederhana saya ini gan, mungkin masih banyak sekali kesalahan yang terdapat dalam game ini. Jika ada kritik dan saran langsung aja ya gan di kotak komentar di bawah :)
Tidak ada komentar:
Posting Komentar