السلام عليكم ورحمة الله تعالى وبركاته
إن الحمد لله نحمده ونستعينه ونستغفره ، ونعوذ بالله من شرور أنفسنا وسيئات أعمالنا ، من يهده الله فلا مضل له ومن يضلل
فلا هادي له ، وأشهد أن لا إلـه إلا الله وحده لا شريك له وأشهد أن محمـدا عبده ورسوله صلى الله عليه وعلى آله وصحبه
وسلم تسليما كثيرا إلى يوم الدين .
أما بعد ، فأهدي سلامي الحار لكل أعضاء وزوار المنتدى و أقول لهم رمضان مبارك سعيد .
ولأنه لا يوجد أكل أثناء الصيام فإنني أجد الوقت لكتابة البرامج ، لذا قمت ببرمجة هذه اللعبة التي سميتها Syria Freedom Game 2012
تنبني هذه اللعبة بشكل عام على إيجاد جملة صحيحة لغويا و باللغة الإنجليزية لكافية الحروف التي تتكون منها أسماء هؤلاء الطغاة الأربعة
ومن نسيته فل يعلم أنني لم أشأ إضافته للعبة نظرا لطول سورس كود اللعبة ، هؤلاء الأربعة المجرمين هم :
بشار ، معمر ، مبارك ، بن علي .
وردت أسماؤهم في اللعبة على النحو الآتي :
BACHAR, MAAMAR, MUBARAK, BENALI
مثلا لنأخذ إسم الطاغية بشار على سبيل المثال ، يتوجب عليك كلاعب أن تخمن ماذا نقصد بالحرف B و الحرف A إلخ .
وكمثال توضيحي :
POO => Programming Oriented Object
الآن فهمنا كيفية اللعب ، بالمناسبة ففكرة اللعبة أتتني البارحة حيث فكرت أن أحول إسم بشار إلى جملة صحيحة لغويا ولها معنى
سليم ، والطامة الكبرى هي أنني وجدت له جملة تعكس ما يوجد على الأرض بنسبة 100 في 100 . سأدعكم لتتعرفوا عليها
من خلال اللعبة ، و بالنسبة للسورس كود فهو طويل نسبيا (أكثر من 400 سطر) لذا إن لم تفهموا جزء من البرنامج فسأشرحه لكم
بما أوتيته من جهد و قوة ( إن بقيت لي قوة) ...
صور للعبة :



السورس الكود الخاص باللعبة :
#include "HSG.h"
#include <stdlib.h>
#include <time.h>
#include <string.h>
void Game_representation();
typedef struct {
char B[50];
char A[50];
char C[50];
char H[50];
char A1[50];
char R[50];
}BACHAR ;
typedef struct {
char M[50];
char A[50];
char A1[50];
char M1[50];
char A2[50];
char R[50];
}MAAMAR;
typedef struct {
char B[50];
char E[50];
char N[50];
char A[50];
char L[50];
char I[50];
}BENALI;
typedef struct {
char M[50];
char U[50];
char B[50];
char A[50];
char R[50];
char A1[50];
char K[50];
}MUBARAK ;
char *Keywords []=
{"Killer","Assassin","Mis","Understanding","Kings","Cried","Russia","How","Are","Nursling","Bad","Hero","Big",
"Myster","All","Annoys","Americans","Russians","Emperor","And","Infant","Little","Becomes","A","Reply","War","Freedom",
"Army","Round","Syria","Crazy","Boy","After","Stupid","Low","Against","Beauty","Donkey","Musulmans","Sheep"};
main(){
Game_representation();
}
void Game_representation(){
char intro[]= " Basicly, this game is programmed for demonstrating How Syrian People \n"
" \t can be change your bad opinion about Syria Greatest Revolution !!! \n\n"
" \t in another words, if you are Against you should be make an alteration \n\n"
" \t or a modification for your stupid brain ;). If you are for you must be \n\n"
" \t change your behavior after this, you can say I'am From Musulman People.\n\n\n"
" \t\t\t There is No God But Allah \n\n\n\n\n"
"\t\t\t\t Syrian People is not Terrorist As You Think !!!\n\n\n\n "
" \t\t Syrian People is surly a Musulman People As Not You Think !!!";
char sanction[] = "\t You didn't know the best way to distiguish between the killer\n\n\n"
" \t And the killed. So, you must go to bed !!!";
char win[]= "\t You Win !!! You Are with Syrian Freedom Army, Even When \n\n\t"
" I tried to ask you some questions, you are giving me \n\n\t"
" the whole answer . You Are Realy A Leader !!! ";
char AboutHamzaQdider[] = "\t I'm Hamza Qdider, I'm 18 Years Old I like C Programming \n\n\t"
" Language, If you didn't know me you can talk with me in this \n\n\t"
" E-Mail : hamzahood@hotmail.fr \n\n\t"
" \t Free Syria !!!\n\n\t"
" \t\t\t By Hamza Qdider, All Rights Reserved 2012";
unsigned short int pick,i=0;
GoFullScreenMode();
DrawRect(26,1,28,3,28,3,13);
cursorxy(28,3);
ChangeColor(14);
printf("Syrian Freedom Game 2012");
cursorxy(10,16);
ChangeColor(4);
while(i!= sizeof(intro)-1){
printf("%c",intro);
Sleep(130);
i++;
}
getchar();
Header:
system("cls");
DrawRect(26,1,28,3,28,3,13);
cursorxy(28,3);
ChangeColor(14);
printf("Syrian Freedom Game 2012");
cursorxy(5,10);
ChangeColor(12);
printf("Game Options : ");
Drawlinexy(3,11,1,sizeof("Game Options : "),2);
cursorxy(6,20);
printf(" 1 - You Are With Bachar's Killer Army $*_^$ !");
cursorxy(6,24);
printf(" 2 - You Are Against with Bachar's Killer Army So, You Are with \n\n\tSyrian Freedom Army !");
cursorxy(6,29);
printf(" 3 - About Syria's Freedom Game 2012 Programmer !!!");
cursorxy(6,33);
printf(" 4 - Enter 4 to exit !!! ");
cursorxy(16,38);
ChangeColor(11);
printf("Please choose one of this options and put it here : ");
scanf("%d",&pick);
switch(pick){
case 1:
system("cls");
cursorxy(15,25);
ChangeColor(11);
i=0;
while(i!= sizeof(sanction)-1){
printf("%c",sanction[i++]);
Sleep(130);
}
goto Header;
break;
case 2:
BACHAR bachar;
MAAMAR maamar;
BENALI benali;
MUBARAK mubarak;
system("cls");
srand(time(NULL));
DrawRect(26,1,28,3,28,3,13);
cursorxy(28,3);
ChangeColor(14);
printf("Syrian Freedom Game 2012");
cursorxy(5,10);
ChangeColor(12);
printf("Questions : ");
Drawlinexy(3,11,1,sizeof("Questions : "),2);
cursorxy(6,16);
printf("1 - What do you mean by BACHAR ? \n\n\n");
printf("\t Compose a statement with this words : \n\n");
printf("\t\t%s - %s - %s - %s - %s \n\n\t\t%s - %s - %s - %s - %s ",
Keywords[12],Keywords[rand()%(0,39)],
Keywords[1],Keywords[5],Keywords[rand()%(0,39)],
Keywords[rand()%(0,39)],Keywords[rand()%(0,39)],
Keywords[7],Keywords[6],Keywords[8]);
cursorxy(6,25);
ChangeColor(15);
/* question 1 */
printf("Put Your Reply as follows : \n\n");
printf("\t What do you mean by 'B'? => ");
scanf("%s",bachar.B);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&bachar.A);
printf("\n\n\t What do you mean by 'C'? => ");
scanf("%s",&bachar.C);
printf("\n\n\t What do you mean by 'H'? => ");
scanf("%s",&bachar.H);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&bachar.A1);
printf("\n\n\t What do you mean by 'R'? => ");
scanf("%s",&bachar.R);
if(strcmp(bachar.B ,"Big")== 0) {
if(strcmp(bachar.A,"Assassin")== 0)
if(strcmp(bachar.C,"Cried")== 0)
if(strcmp(bachar.H,"How")== 0)
if(strcmp(bachar.A1,"Are")== 0)
if(strcmp(bachar.R,"Russia")== 0) {
ChangeColor(12);
printf("\n\n\n\t Yes, you had Entered a Correct reply !!!\n\n\t ");
system("pause");
/* question 2 */
system("cls");
srand(time(NULL));
DrawRect(26,1,28,3,28,3,13);
cursorxy(28,3);
ChangeColor(14);
printf("Syrian Freedom Game 2012");
cursorxy(5,10);
ChangeColor(12);
printf("Questions : ");
Drawlinexy(3,11,1,sizeof("Questions : "),2);
cursorxy(6,16);
printf("1 - What do you mean by MAAMAR ? \n\n\n");
printf("\t Compose a statement with this words : \n\n");
printf("\t\t%s - %s - %s - %s - %s \n\n\t\t%s - %s - %s - %s - %s ",
Keywords[rand()%(0,39)],Keywords[16],
Keywords[13],Keywords[5],Keywords[rand()%(0,39)],
Keywords[rand()%(0,39)],Keywords[17],
Keywords[15],Keywords[14],Keywords[38]);
cursorxy(6,25);
ChangeColor(15);
printf("Put Your Reply as follows : \n\n");
printf("\t What do you mean by 'M'? => ");
scanf("%s",maamar.M);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&maamar.A);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&maamar.A1);
printf("\n\n\t What do you mean by 'M'? => ");
scanf("%s",&maamar.M1);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&maamar.A2);
printf("\n\n\t What do you mean by 'R'? => ");
scanf("%s",&maamar.R);
if(strcmp(maamar.M ,"Myster")== 0) {
if(strcmp(maamar.A,"Annoys")== 0)
if(strcmp(maamar.A1,"All")== 0)
if(strcmp(maamar.M1,"Musulmans")== 0)
if(strcmp(maamar.A2,"Americans")== 0)
if(strcmp(maamar.R,"Russians")== 0) {
ChangeColor(12);
printf("\n\n\n\t Yes, you had Entered a Correct reply !!!\n\n\t ");
system("pause");
/* question 3 */
system("cls");
srand(time(NULL));
DrawRect(26,1,28,3,28,3,13);
cursorxy(28,3);
ChangeColor(14);
printf("Syrian Freedom Game 2012");
cursorxy(5,10);
ChangeColor(12);
printf("Questions : ");
Drawlinexy(3,11,1,sizeof("Questions : "),2);
cursorxy(6,16);
printf("1 - What do you mean by BENALI ? \n\n\n");
printf("\t Compose a statement with this words : \n\n");
printf("\t\t%s - %s - %s - %s - %s \n\n\t\t%s - %s - %s - %s - %s ",
Keywords[rand()%(0,39)],Keywords[9],
Keywords[12],Keywords[18],Keywords[rand()%(0,39)],
Keywords[rand()%(0,39)],Keywords[19],
Keywords[20],Keywords[rand()%(0,39)],Keywords[21]);
cursorxy(6,25);
ChangeColor(15);
printf("Put Your Reply as follows : \n\n");
printf("\t What do you mean by 'B'? => ");
scanf("%s",benali.B);
printf("\n\n\t What do you mean by 'E'? => ");
scanf("%s",&benali.E);
printf("\n\n\t What do you mean by 'N'? => ");
scanf("%s",&benali.N);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&benali.A);
printf("\n\n\t What do you mean by 'L'? => ");
scanf("%s",&benali.L);
printf("\n\n\t What do you mean by 'I'? => ");
scanf("%s",&benali.I);
if(strcmp(benali.B ,"Big")== 0) {
if(strcmp(benali.E,"Emperor")== 0)
if(strcmp(benali.N,"Nursling")== 0)
if(strcmp(benali.A,"And")== 0)
if(strcmp(benali.L,"Little")== 0)
if(strcmp(benali.I,"Infant")== 0) {
ChangeColor(12);
printf("\n\n\n\t Yes, you had Entered a Correct reply !!!\n\n\t");
system("pause");
/* Question 4 */
system("cls");
srand(time(NULL));
DrawRect(26,1,28,3,28,3,13);
cursorxy(28,3);
ChangeColor(14);
printf("Syrian Freedom Game 2012");
cursorxy(5,10);
ChangeColor(12);
printf("Questions : ");
Drawlinexy(3,11,1,sizeof("Questions : "),2);
cursorxy(6,16);
printf("1 - What do you mean by MUBARAK ? \n\n\n");
printf("\t Compose a statement with this words : \n\n");
printf("\t\t%s - %s - %s - %s - %s \n\n\t\t%s - %s - %s - %s - %s ",
Keywords[4],Keywords[2],
Keywords[23],Keywords[18],Keywords[rand()%(0,39)],
Keywords[14],Keywords[22],
Keywords[24],Keywords[rand()%(0,39)],Keywords[3]);
cursorxy(6,25);
ChangeColor(15);
printf("Put Your Reply as follows : \n\n");
printf("\t What do you mean by 'M'? => ");
scanf("%s",mubarak.M);
printf("\n\n\t What do you mean by 'U'? => ");
scanf("%s",&mubarak.U);
printf("\n\n\t What do you mean by 'B'? => ");
scanf("%s",&mubarak.B);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&mubarak.A);
printf("\n\n\t What do you mean by 'R'? => ");
scanf("%s",&mubarak.R);
printf("\n\n\t What do you mean by 'A'? => ");
scanf("%s",&mubarak.A1);
printf("\n\n\t What do you mean by 'K'? => ");
scanf("%s",&mubarak.K);
if(strcmp(mubarak.M,"Mis")== 0) {
if(strcmp(mubarak.U,"Understanding")== 0)
if(strcmp(mubarak.B,"Becomes")== 0)
if(strcmp(mubarak.A,"A")== 0)
if(strcmp(mubarak.R,"Reply")== 0)
if(strcmp(mubarak.A1,"All")== 0)
if(strcmp(mubarak.K,"Kings")== 0) {
ChangeColor(12);
printf("\n\n\n\t Yes, you had Entered a Correct reply !!!\n\n\t");
system("pause");
system("cls");
cursorxy(15,25);
ChangeColor(11);
i=0;
while(i!= sizeof(win)-1){
printf("%c",win[i++]);
Sleep(130);
}
printf("\n\n\n\t\t");
system("pause");
goto Header;
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Mis-Understanding Becomes A Reply for All Kings");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Mis-Understanding Becomes A Reply for All Kings");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Big Emperor, Nursling And Little Infant");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Big Emperor, Nursling And Little Infant");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Myster Annoys All Musulmans, Americans, Russians");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Myster Annoys All Musulmans, Americans, Russians");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Big Assassin Cried How Are Russia ");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
}
else {
ChangeColor(12);
printf("\n\n\tthe Correct Reply is : Big Assassin Cried How Are Russia ");
printf("\n\n\t Game Over !!! Press a key to return ...\n\n\t");
system("pause");
goto Header;
}
break;
case 3:
system("cls");
cursorxy(12,18);
ChangeColor(4);
i=0;
while(i!= sizeof(AboutHamzaQdider)-1){
printf("%c",AboutHamzaQdider[i++]);
Sleep(130);
}
goto Header;
break;
case 4:
exit(0);
default:
goto Header;
break;
}
}/* Author : Hamza Qdider */
/* Lib Name : Hamza Graphic (HG.h) */
#include <stdio.h>
#include <windows.h> // for SetConsoleCursorPosition() function
void Drawlinexy(int x,int y,int HORIZ_OR_VERT,int length,int color)
{
int x1;
HANDLE Line=GetStdHandle(STD_OUTPUT_HANDLE);
COORD cursor={x,y};
SetConsoleTextAttribute(Line,color);
if(HORIZ_OR_VERT==1)
{
SetConsoleCursorPosition(Line,cursor);
for(x1=0;x1<=length;x1++)
printf("%lc",196); // Horizontal Line
}
else if(HORIZ_OR_VERT==2)
{
for(x1=0;x1<=length;x1++){
cursor.X=x;
cursor.Y=y;
SetConsoleCursorPosition(Line,cursor);
printf("%lc",179);// vertical Line
y++;
}
}
}
void DrawRect(int x,int y,int AB,int AC,int CD,int BD,int color)
{
int d,y1,y2,x1;
HANDLE Rect=GetStdHandle(STD_OUTPUT_HANDLE);
COORD cursor={x,y};
y1=y+1;
y2=y;
x1=x;
SetConsoleTextAttribute(Rect,color);
SetConsoleCursorPosition(Rect,cursor);
for(d=0;d<=AB;d++){
printf("%lc",196);
}
cursor.X=x+AB;
SetConsoleCursorPosition(Rect,cursor);
printf("%lc",191);
for(d=0;d<=BD;d++){
cursor.X=x+AB;cursor.Y=y+1;
SetConsoleCursorPosition(Rect,cursor);
printf("%lc",179);
y++;
}
for(d=0;d<=CD-1;d++){
cursor.X=x;cursor.Y=y+1;
SetConsoleCursorPosition(Rect,cursor);
printf("%lc",196);
x++;
}
cursor.X=x1+CD;cursor.Y=y2+(BD+2);
SetConsoleCursorPosition(Rect,cursor);
printf("%lc",217);
for(d=0;d<=AC;d++){
cursor.X=x-AB-1;cursor.Y=y1;
SetConsoleCursorPosition(Rect,cursor);
printf("%lc",179);
y1++;
}
cursor.X=x-AB-1;cursor.Y=y2;
SetConsoleCursorPosition(Rect,cursor);
printf("%lc",218);
cursor.X=x-AB-1;cursor.Y=y1;
SetConsoleCursorPosition(Rect,cursor);
printf("%lc",192);
}
void cursorxy(int x,int y)
{
HANDLE curs=GetStdHandle(STD_OUTPUT_HANDLE);
COORD cursor;
cursor.X=x;
cursor.Y=y;
SetConsoleCursorPosition(curs,cursor);
}
void ChangeColor(int color)
{
HANDLE h=GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(h,color);
}
void GoFullScreenMode()
{
keybd_event(VK_MENU,0x38,0,0); // الضغط على زر ألط
keybd_event(VK_RETURN,0x1C,0,0); // الضغط على زر أنتري
keybd_event(VK_RETURN,0x1C,KEYEVENTF_KEYUP,0);
keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0); // إزالة الضغط
Sleep(1000);
}والسلام عليكم ورحمة الله تعالى و بركاته ...
