Code Jam 2.0 | لعبة وكود

العرض النهائي

Tasnim Fattal and Kemal Beg

- KEMAL BEG

- TASNEEM FATTAL

luck game

#include <iostream>

#include <cstdlib>

#include <ctime>

using namespace std;

int main()

{

cout << "                ######   ######   #   #       "  <<endl;

cout << "                     #        #   #   #       "  <<endl;

cout << "                ######        #   ######      "  <<endl;

cout << "                     #        #       #       "  <<endl;

cout << "                ######        #       #       "  <<endl;

cout<<endl;

cout<<endl;

string name1, name2 , Start ;

int age1, age2,luc[12];

cout << "You are welcome to our luck game "<< endl;

cout <<"Press the number one to start the game...:)"<< endl; cin>>Start;

cout << "player (1) Enter your name" << endl; cin >> name1;

cout << "player (1) Enter your age" << endl;  cin >> age1;

cout << "player (2) Enter your name" << endl; cin >> name2;

cout << "player (2) Enter your age" << endl;  cin >> age2;

if (age1 <= 10 || age2 <= 10)    {return 0;}

system("CLS");

    srand((unsigned)time(0));

    int list[12];

    int sum = 0;

for (int z = 0; z <= 11; z++)

    {list[z] = rand() % 20 + 1;}

for (int y = y; y <= 11; y++)

    {cout << list[y] << endl;

            sum = sum + list[y];}

int ts = 0;

    for (int i = 0; i <= 11; i++)

    {luc[i] = rand() % 20 + 1;}

    for (int x = 0; x <= 11; x++){

cout << luc[x] << endl;

ts = ts + luc[x];

    }

        system("CLS");

cout << list[0] << "|" << list[1] << "|" << list[2] << endl;

    cout << list[3] << "|" << list[4] << "|" << list[5] << endl;

    cout << list[6] << "|" << list[7] << "|" << list[8] << endl;

    cout << list[9] << "|" << list[10] <<"|" << list[11] << endl;

    cout<<"\n";

    cout << "the sum player 1 is:" << sum << endl;

    cout<<"\n";

    cout << luc[0] << "|" << luc[1] << "|" << luc[2] << endl;

    cout << luc[3] << "|" << luc[4] << "|" << luc[5] << endl;

    cout << luc[6] << "|" << luc[7] << "|" << luc[8] << endl;

    cout << luc[9] << "|" << luc[10] <<"|" << luc[11] << endl;

    cout<<"\n";

    cout << "the sum player 2 is:" << ts << endl;

   if(sum>ts){

cout<<"\n";

       cout<<"the  player 1 is the winner"<<endl;}

    else{

     cout<<"\n";

       cout<<"the player 2 is the winner"<<endl;    }

cin.get();

     cin.get();}

Mystery box

  صندوق الغموض

Mousa zaidan

Wael ajlouni

afa.cpp

#include <iostream>

#include <conio.h>

#include <stdlib.h>

#include <windows.h>

using namespace std;

int f[4][5];

int a =0;

int b =0;

int c =0;

int d =0;

int y =0;

int r =0;

int t1=0;

int z,x,p,t,m2;

int m1=0;

string tt;

string name;

void start()

{

     system("Color E0");

cout<<"\n \n \n \n \n \n \n \n \n ";

cout<<"\t @         @  @     @   @ @   @ @ @ @ @ @  @ @ @ @  @ @    @     @     @ @       @  @    @     @          "<<endl;

cout<<"\t @ @     @ @   @   @   @    @      @       @        @   @   @   @      @   @   @      @   @   @           "<<endl;

cout<<"\t @  @   @  @    @ @      @         @       @ @ @    @   @    @ @       @ @    @        @   @ @            "<<endl;

cout<<"\t @   @ @   @     @        @        @       @        @ @       @        @   @  @        @    @             "<<endl;

cout<<"\t @    @    @     @     @    @      @       @        @  @      @        @   @   @      @   @  @            "<<endl;

cout<<"\t @         @     @       @ @       @       @ @ @ @  @   @     @        @ @       @  @    @    @           "<<endl;

cout<<"\n \n \n \n";

cout<<"         -----------------------------------press any key to start----------------------------------------";

_getch();

}

void win(){

system("Color 27");

cout<<"\t                                               "<<endl;

cout<<"\t  00          00  00 00 00    00      00       "<<endl;

cout<<"\t   00   00   00      00       00 00   00       "<<endl;

cout<<"\t    00 0000 00       00       00   00 00       "<<endl;

cout<<"\t     00    00    00  00 00    00      00       "<<endl;

cout<<"\t                                               "<<endl;

}

void lose()

{

   system("Color 47");

cout<<"\t $         $ $      $ $    $ $ $ $      "<<endl;

cout<<"\t $       $     $   $    $  $            "<<endl;

cout<<"\t $      $       $   $      $ $ $        "<<endl;

cout<<"\t $      $       $     $    $            "<<endl;

cout<<"\t $       $     $   $    $  $            "<<endl;

cout<<"\t $ $ $     $ $      $  $   $ $ $ $      "<<endl;

}

int main()

{

    start();

    system("cls");

     for(int i = 0 ; i < 4 ; i++)

{

for(int u = 0 ; u < 5 ; u++)

   {

       f[i][u] = rand() % 2;

   }

}

for(int u = 0 ; u < 5 ; u++)

   {

       if (f[0][u] == 1)

        a=a+1;

   }

   for(int u = 0 ; u < 5 ; u++)

   {

       if (f[1][u] == 1)

        b=b+1;

   }

   for(int u = 0 ; u < 5 ; u++)

   {

       if (f[2][u] == 1)

        c=c+1;

   }

   for(int u = 0 ; u < 5 ; u++)

   {

       if (f[3][u] == 1)

        d=d+1;

   }

   a= a * 1000;

    b= b * 100;

     c= c * 10;

      r=a+b+c+d;

     system("Color E0");

   cout <<"\n\n\n \t  enter your name : \n \t";

   cin>>name;

   cout << "\n \t -------------Press any key to continue-------------" << endl;

    _getch();

    system("cls");

   cout<<"\n \t ok "<<name<<" try to get into the house \n \t let's look around the house \n\t where we should look";

 cout<<" \n \t 1.west \n\t 2.east \n\t 3.north \n\t 4.south \n\t";

 retry:

 cin>>z;

 if(z==1){

    cout<<" \t 1 locked door 4 locked windows \n\t try to look some where else";//end

    goto retry;

 }

else if(z==2){

    cout<<"\t no doors 2 locked window \n\t try to look some where else";//end

    goto retry;

}

else if(z==3){

    cout<<"\t 1 locked door 3 locked window \n\t try to look some where else";//end

    goto retry;

}

else if(z==4){

    cout<<" \t1 locked door one open window \n\t # i will try to get in from this window";

    cout << "\n \t -------------Press any key to continue-------------" << endl;

    _getch();

    system("cls");

    cout << "\n\n\n \t # I did it I'm in the house \n\t # it's dark but i think I'm in the warehouse \n ";

    cout << "\t 1. search for some usable things \n\t 2. go out the room and try to find the box \n";

    sos:

    cin>>x;

     if (x == 2){

     ff:

         system("cls");

     cout << "\n\n\n \t # there is 2 rooms here where i should go ? \n";

     cout<< "\t 1. right \n 2.left";

    cin>>p;

     if (p==1){

ss:

           cout<<"\t the door is locked we have to enter the password \n ";


     if (m1==1){

           cout<<"\t Maybe we could use the paper \n \n \n";

           for(int i = 0 ; i < 4 ; i++)

{

   for(int u = 0 ; u < 5 ; u++)

   {

       cout << f[i][u] << "     ";

   }

   cout<<endl;

}

     }

     gg:

cout << "\n \t enter the password : " ;

cin>>m2;

if (m2==r)

{

    cout<<"\t correct";

     cout << "\n \t -------------Press any key to continue-------------" << endl;

      _getch();

      system("cls");

    win();

}

else{

        cout<<"\n \t wrong!!";

     t1=t1+1;

     if (t1==1)

     tt="\n \t look at the '1'";

     else if (t==2)

     tt="\n \t how many '1' in the row ";

     else if (t1==3)

     {

          cout << "\n \t -------------Press any key to continue-------------" << endl;

      _getch();

      system("cls");

    lose();

     }

  cout<<tt;

   goto gg;

}

     }

    else if (p==2){

cout<<"\t this room is empty I should go to the other room";

goto ss;

     }

    }

    else if (x == 1){

cout<<"\t I found this piece of paper with weird code \n";

cout<<"\n \n";

for(int i = 0 ; i < 4 ; i++)

{

   for(int u = 0 ; u < 5 ; u++)

   {

       cout << f[i][u] << "     ";

   }

   cout<<endl;

}

   m1=1;

      cout<<"\n \t I will keep it , it might be useful \n\t # I will go and try to find the box ";

       cout << "\n \t -------------Press any key to continue-------------" << endl;

      _getch();

      goto ff;

    }

    else{

    cout << "\t you are doing it wrong pick 1 or 2";

    goto sos;

    }

}

else{

        cout << "\t you are doing it wrong pick 1 , 2 , 3 or 4";

    goto retry;

}

}


Bingo Game

Hikmet Karkour and 2 OthersSedrah Sadah
Obeyda Alrashidbazid

Bingo Game

 Sedra Sada

Hikmet Karkour

Obaida Abazid

| لعبة الأسئلة |

Mahmod Koki and khaled Tawami

Question game | لعبة الأسئلة

Code Jam 2 | لعبة وكود 2

Khaled Tawami | Mahmod koki

#include <iostream>

using namespace std;

int main()

{

string N;

 int A;

 cout << "Welcome to the game..\n";

 cout << "\n";

 cout << "(P1)Enter your name:"<<endl;

 cin  >> N;

 cout << "(P1)Enter your age:"<<endl;

 cin  >> A;

  if (A>=11)

{

 cout <<"Good luck :) "<<endl;

}

 else

{

 cout << "You are young :("<<endl;

}

    char t;

    int O, x;

    int math[6];

    int history[6];

    int Sport[6];

    int score = 0;

    cout << "Choose one question:" << endl;

    cout << "1.Math" << endl;

    cout << "2.History" << endl;

    cout << "3.Sport" << endl;

    cin >> x;

    for (;;)

    {

        if (score == -3)

        {

            cout << "Game over" << endl;

            cout << "Your score is:" << score << endl;

            break;

        }

        if (x == 1)

        {

            cout << "Choose between 1 ---> 6" << endl;

            cin >> O;

            if (O == 1)

            {

                cout << " What 19x6= ?" << endl;

                cout << " The answer is : " << endl;

                cin >> math[0];

                if (math[0] == 114)

                {

                    cout << "Thats Correct ;)" << endl;

                    score++;

                    cout << "Your score is:" << score << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is: 114" << endl;

                    score--;

                    cout << "Your score is:" << score << endl;

                }


            }

            if (O == 2)

            {

                cout << " What is 76/4= ?" << endl;

                cout << " The answer is : " << endl;

                cin >> math[1];

                if (math[1] == 19)

                {

                    cout << "Thats Correct ;)" << endl;

                    score++;

                    cout << "Your score is:" << score << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is: 19 " << endl;

                    score--;

                    cout << "Your score is:" << score << endl;

                }


            }

            if (O == 3)

            {

                cout << " What is root of 49 ? " << endl;

                cout << " The answer is : " << endl;

                cin >> math[2];

                if (math[2] == 7)

                {

                    cout << "Thats Correct ;)" << endl;

                    score++;

                    cout << "Your score is:" << score << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:7" << endl;

                    score--;

                    cout << "Your score is:" << score << endl;

                }


            }

            if (O == 4)

            {

                cout << " What 86+27=? " << endl;

                cout << " The answer is : " << endl;

                cin >> math[3];

                if (math[3] == 113)

                {

                    cout << "Thats Correct ;)" << endl;

                    score++;

                    cout << "Your score is:" << score << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:113 " << endl;

                    score--;

                    cout << "Your score is:" << score << endl;

                }


            }


            if (O == 5)

            {

                cout << " What is 43-27=? " << endl;

                cout << " The answer is : " << endl;

                cin >> math[4];

                if (math[4] == 16)

                {

                    cout << "Thats Correct ;)" << endl;

                    score++;

                    cout << "Your score is:" << score << endl;


                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:16 " << endl;

                    score--;

                    cout << "Your score is:" << score << endl;

                }


            }

            if (O == 6)

            {

                cout << " What 21*6=? " << endl;

                cout << " The answer is : " << endl;

                cin >> math[5];

                if (math[5] == 126)

                {

                    cout << "Thats Correct ;)" << endl;

                    cout << "Your score is:" << score << endl;

                    score++;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:126 " << endl;

                    score--;

                    cout << "Your score is:" << score << endl;

                }


            }


        }


        if (x == 2)

        {

            cout << "Choose between 1 ---> 6" << endl;

            cin >> O;

            if (O == 1)

            {

                cout << "When did the WW2 started ?" << endl;

                cout << " The answer is : " << endl;

                cin >> history[0];

                if (history[0] == 1939)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is: From ""1939"" to 1946 " << endl;

                }


            }

            if (O == 2)

            {

                cout << "When did Columbus discover America? ?" << endl;

                cout << " The answer is : " << endl;

                cin >> history[1];

                if (history[1] == 1492)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:1492  " << endl;

                }


            }

            if (O == 3)

            {

                cout << " When did Hitler suicide ? " << endl;

                cout << " The answer is : " << endl;

                cin >> history[2];

                if (history[2] == 1945)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:1945" << endl;

                }


            }

            if (O == 4)

            {

                cout << " When was Saladin born? " << endl;

                cout << " The answer is : " << endl;

                cin >> history[3];

                if (history[3] == 1138)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:1138 " << endl;

                }


            }

            if (O == 5)

            {

                cout << " When was the United Kingdom established? " << endl;

                cout << " The answer is : " << endl;

                cin >> math[4];

                if (math[4] == 1922)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:1922 " << endl;

                }


            }

            if (O == 6)

            {

                cout << " When was Independence Day in Syria?? " << endl;

                cout << " The answer is : " << endl;

                cin >> history[5];

                if (history[5] == 1946)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:1946 " << endl;

                }


            }



        }

        if (x == 3)

        {

            cout << "Choose between 1 ---> 6" << endl;

            cin >> O;

            if (O == 1)

            {

                cout << "What is the longest swimming distance?" << endl;

                cout << " The answer is ____km: " << endl;

                cin >> Sport[0];

                if (Sport[0] == 151)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is: 151 km" << endl;

                }

            }

            if (O == 2)

            {

                cout << "How tall are the volleyball players?" << endl;

                cout << " The answer is ____cm : " << endl;

                cin >> Sport[1];

                if (Sport[1] == 195)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is: 195cm " << endl;

                }

            }

            if (O == 3)

            {

                cout << "How many times does Nadal win tennis championships? ? " << endl;

                cout << " The answer is : " << endl;

                cin >> Sport[2];

                if (Sport[2] == 20)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is:" << endl;

                }

            }

            if (O == 4)

            {

                cout << " How many Champions League Cups for Real? " << endl;

                cout << " The answer is : " << endl;

                cin >> Sport[3];

                if (Sport[3] == 13)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is: 13" << endl;

                }

            }

            if (O == 5)

            {

                cout << "When was the first Olympiad tournament?  " << endl;

                cout << " The answer is : " << endl;

                cin >> Sport[4];

                if (Sport[4] == 1896)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                    cout << "The answer is: 1896 " << endl;

                }

            }

            if (O == 6)

            {

                cout << " What is the height of the basket in basketball? " << endl;

                cout << " The answer is ___m: " << endl;

                cin >> Sport[5];

                if (Sport[5] == 3)

                {

                    cout << "Thats Correct ;)" << endl;

                }

                else

                {

                    cout << "Wrong answer :(" << endl;

                   cout << "The answer is: 3.05m " << endl;

                }

            }

        }

    }

}

العرض النهائي

Kemal Beg and Kemal Beg

 الاسم:   كمال البيك 

Precision game

Mystrey Box (صندوق الغموض)

Mousa Zaidan

Bingo Game

Hikmet Karkour

الكود البرمجي



#include <iostream>

#include <algorithm>

#include <time.h>


using namespace std;


int main()

{




    

    


    char s1[] = { 'o','o','o','o','o','o','o','o','o','o','o','o' };

    char s2[] = { 'o','o','o','o','o','o','o','o','o','o','o','o' };

    char s3[] = { 'o','o','o','o','o','o','o','o','o','o','o','o' };

    string o;


    string PlayerList1[25] = { "1 ","2 ","3 ","4 ","5 ","6 ","7 ","8 ","9 ","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25" };

    

    

    random_shuffle(PlayerList1, PlayerList1 + 25);

    int PlayerSecore1 = 0;


    string PleyerName1;

    cout << "Player 1 Name: ";

    cin >> PleyerName1;

    

   

 

    string PlayerList2[25] = { "1 ","2 ","3 ","4 ","5 ","6 ","7 ","8 ","9 ","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25" };

    random_shuffle(PlayerList2, PlayerList2 + 25);

    

    int PlayerSecore2 = 0;

    string PleyerName2;

    cout << "Player 2 Name: ";

    cin >> PleyerName2;



    string PlayerList3[25] = { "1 ","2 ","3 ","4 ","5 ","6 ","7 ","8 ","9 ","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25" };

    random_shuffle(PlayerList3, PlayerList3 + 25);

    

    int PlayerSecore3 = 0;

    string PleyerName3;

    cout << "Player 3 Name: ";

    cin >> PleyerName3;

    

    

    

    



    

    


    for (;;) {





        system("cls");


        cout <<

            PleyerName1 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList1[0] << " | " << PlayerList1[1] << " | " << PlayerList1[2] << " | " << PlayerList1[3] << " | " << PlayerList1[4] << " |" << endl <<

            "| " << PlayerList1[5] << " | " << PlayerList1[6] << " | " << PlayerList1[7] << " | " << PlayerList1[8] << " | " << PlayerList1[9] << " |" << endl <<

            "| " << PlayerList1[10] << " | " << PlayerList1[11] << " | " << PlayerList1[12] << " | " << PlayerList1[13] << " | " << PlayerList1[14] << " | " << "Score: " << PlayerSecore1 << endl <<

            "| " << PlayerList1[15] << " | " << PlayerList1[16] << " | " << PlayerList1[17] << " | " << PlayerList1[18] << " | " << PlayerList1[19] << " |" << endl <<

            "| " << PlayerList1[20] << " | " << PlayerList1[21] << " | " << PlayerList1[22] << " | " << PlayerList1[23] << " | " << PlayerList1[24] << " |" << endl <<

            " ------------------------" << endl << endl;

        cout <<

            PleyerName2 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList2[0] << " | " << PlayerList2[1] << " | " << PlayerList2[2] << " | " << PlayerList2[3] << " | " << PlayerList2[4] << " |" << endl <<

            "| " << PlayerList2[5] << " | " << PlayerList2[6] << " | " << PlayerList2[7] << " | " << PlayerList2[8] << " | " << PlayerList2[9] << " |" << endl <<

            "| " << PlayerList2[10] << " | " << PlayerList2[11] << " | " << PlayerList2[12] << " | " << PlayerList2[13] << " | " << PlayerList2[14] << " | " << "Score: " << PlayerSecore2 << endl <<

            "| " << PlayerList2[15] << " | " << PlayerList2[16] << " | " << PlayerList2[17] << " | " << PlayerList2[18] << " | " << PlayerList2[19] << " |" << endl <<

            "| " << PlayerList2[20] << " | " << PlayerList2[21] << " | " << PlayerList2[22] << " | " << PlayerList2[23] << " | " << PlayerList2[24] << " |" << endl <<

            " ------------------------" << endl << endl;

        cout <<

            PleyerName3 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList3[0] << " | " << PlayerList3[1] << " | " << PlayerList3[2] << " | " << PlayerList3[3] << " | " << PlayerList3[4] << " |" << endl <<

            "| " << PlayerList3[5] << " | " << PlayerList3[6] << " | " << PlayerList3[7] << " | " << PlayerList3[8] << " | " << PlayerList3[9] << " |" << endl <<

            "| " << PlayerList3[10] << " | " << PlayerList3[11] << " | " << PlayerList3[12] << " | " << PlayerList3[13] << " | " << PlayerList3[14] << " | " << "Score: " << PlayerSecore3 << endl <<

            "| " << PlayerList3[15] << " | " << PlayerList3[16] << " | " << PlayerList3[17] << " | " << PlayerList3[18] << " | " << PlayerList3[19] << " |" << endl <<

            "| " << PlayerList3[20] << " | " << PlayerList3[21] << " | " << PlayerList3[22] << " | " << PlayerList3[23] << " | " << PlayerList3[24] << " |" << endl <<

            " ------------------------" << endl << endl;


       


        cout << PleyerName1 << ": ";

        cin >> o; // 15


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList1[i]) {

                PlayerList1[i] = "X ";

            }

            else if (o + " " == PlayerList1[i]) {

                PlayerList1[i] = "X ";

            }

        }


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList2[i]) {

                PlayerList2[i] = "X ";

            }

            else if (o + " " == PlayerList2[i]) {

                PlayerList2[i] = "X ";

            }

        }


        for (int i = 0; i < 25; i++) {


            if (o == PlayerList3[i]) {

                PlayerList3[i] = "X ";

            }

            else if (o + " " == PlayerList3[i]) {

                PlayerList3[i] = "X ";

            }

        }





        if (PlayerList1[0] == "X " && PlayerList1[1] == "X " && PlayerList1[2] == "X " && PlayerList1[3] == "X " && PlayerList1[4] == "X ") {

            if (s1[0] == 'o') {

                s1[0] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[5] == "X " && PlayerList1[6] == "X " && PlayerList1[7] == "X " && PlayerList1[8] == "X " && PlayerList1[9] == "X ") {

            if (s1[1] == 'o') {

                s1[1] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[10] == "X " && PlayerList1[11] == "X " && PlayerList1[12] == "X " && PlayerList1[13] == "X " && PlayerList1[14] == "X ") {

            if (s1[2] == 'o') {

                s1[2] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[15] == "X " && PlayerList1[16] == "X " && PlayerList1[17] == "X " && PlayerList1[18] == "X " && PlayerList1[19] == "X ") {

            if (s1[3] == 'o') {

                s1[3] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[20] == "X " && PlayerList1[21] == "X " && PlayerList1[22] == "X " && PlayerList1[23] == "X " && PlayerList1[24] == "X ") {

            if (s1[4] == 'o') {

                s1[4] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[0] == "X " && PlayerList1[5] == "X " && PlayerList1[10] == "X " && PlayerList1[15] == "X " && PlayerList1[20] == "X ") {

            if (s1[5] == 'o') {

                s1[5] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[1] == "X " && PlayerList1[6] == "X " && PlayerList1[11] == "X " && PlayerList1[16] == "X " && PlayerList1[21] == "X ") {

            if (s1[6] == 'o') {

                s1[6] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[2] == "X " && PlayerList1[7] == "X " && PlayerList1[12] == "X " && PlayerList1[17] == "X " && PlayerList1[22] == "X ") {

            if (s1[7] == 'o') {

                s1[7] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[3] == "X " && PlayerList1[8] == "X " && PlayerList1[13] == "X " && PlayerList1[18] == "X " && PlayerList1[23] == "X ") {

            if (s1[8] == 'o') {

                s1[8] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[4] == "X " && PlayerList1[9] == "X " && PlayerList1[14] == "X " && PlayerList1[19] == "X " && PlayerList1[24] == "X ") {

            if (s1[9] == 'o') {

                s1[9] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[0] == "X " && PlayerList1[6] == "X " && PlayerList1[12] == "X " && PlayerList1[18] == "X " && PlayerList1[24] == "X ") {

            if (s1[10] == 'o') {

                s1[10] = 'x';

                PlayerSecore1++;

            }

        }

        if (PlayerList1[4] == "X " && PlayerList1[8] == "X " && PlayerList1[12] == "X " && PlayerList1[16] == "X " && PlayerList1[20] == "X ") {

            if (s1[11] == 'o') {

                s1[11] = 'x';

                PlayerSecore1++;

            }

        }


        if (PlayerSecore1 == 5) {

            system("cls");

            cout << PleyerName1 << "is winner !!";

            break;

        }


        system("cls");

        

        cout <<

            PleyerName1 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList1[0] << " | " << PlayerList1[1] << " | " << PlayerList1[2] << " | " << PlayerList1[3] << " | " << PlayerList1[4] << " |" << endl <<

            "| " << PlayerList1[5] << " | " << PlayerList1[6] << " | " << PlayerList1[7] << " | " << PlayerList1[8] << " | " << PlayerList1[9] << " |" << endl <<

            "| " << PlayerList1[10] << " | " << PlayerList1[11] << " | " << PlayerList1[12] << " | " << PlayerList1[13] << " | " << PlayerList1[14] << " | " << "Score: " << PlayerSecore1 << endl <<

            "| " << PlayerList1[15] << " | " << PlayerList1[16] << " | " << PlayerList1[17] << " | " << PlayerList1[18] << " | " << PlayerList1[19] << " |" << endl <<

            "| " << PlayerList1[20] << " | " << PlayerList1[21] << " | " << PlayerList1[22] << " | " << PlayerList1[23] << " | " << PlayerList1[24] << " |" << endl <<

            " ------------------------" << endl << endl;

        cout <<

            PleyerName2 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList2[0] << " | " << PlayerList2[1] << " | " << PlayerList2[2] << " | " << PlayerList2[3] << " | " << PlayerList2[4] << " |" << endl <<

            "| " << PlayerList2[5] << " | " << PlayerList2[6] << " | " << PlayerList2[7] << " | " << PlayerList2[8] << " | " << PlayerList2[9] << " |" << endl <<

            "| " << PlayerList2[10] << " | " << PlayerList2[11] << " | " << PlayerList2[12] << " | " << PlayerList2[13] << " | " << PlayerList2[14] << " | " << "Score: " << PlayerSecore2 << endl <<

            "| " << PlayerList2[15] << " | " << PlayerList2[16] << " | " << PlayerList2[17] << " | " << PlayerList2[18] << " | " << PlayerList2[19] << " |" << endl <<

            "| " << PlayerList2[20] << " | " << PlayerList2[21] << " | " << PlayerList2[22] << " | " << PlayerList2[23] << " | " << PlayerList2[24] << " |" << endl <<

            " ------------------------" << endl << endl;

        cout <<

            PleyerName3 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList3[0] << " | " << PlayerList3[1] << " | " << PlayerList3[2] << " | " << PlayerList3[3] << " | " << PlayerList3[4] << " |" << endl <<

            "| " << PlayerList3[5] << " | " << PlayerList3[6] << " | " << PlayerList3[7] << " | " << PlayerList3[8] << " | " << PlayerList3[9] << " |" << endl <<

            "| " << PlayerList3[10] << " | " << PlayerList3[11] << " | " << PlayerList3[12] << " | " << PlayerList3[13] << " | " << PlayerList3[14] << " | " << "Score: " << PlayerSecore3 << endl <<

            "| " << PlayerList3[15] << " | " << PlayerList3[16] << " | " << PlayerList3[17] << " | " << PlayerList3[18] << " | " << PlayerList3[19] << " |" << endl <<

            "| " << PlayerList3[20] << " | " << PlayerList3[21] << " | " << PlayerList3[22] << " | " << PlayerList3[23] << " | " << PlayerList3[24] << " |" << endl <<

            " ------------------------" << endl << endl;


        cout << PleyerName2 << ": ";

        cin >> o; // 15


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList1[i]) {

                PlayerList1[i] = "X ";

            }

            else if (o + " " == PlayerList1[i]) {

                PlayerList1[i] = "X ";

            }

        }


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList2[i]) {

                PlayerList2[i] = "X ";

            }

            else if (o + " " == PlayerList2[i]) {

                PlayerList2[i] = "X ";

            }

        }


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList3[i]) {

                PlayerList3[i] = "X ";

            }

            else if (o + " " == PlayerList3[i]) {

                PlayerList3[i] = "X ";

            }

        }


        if (PlayerList2[0] == "X " && PlayerList2[1] == "X " && PlayerList2[2] == "X " && PlayerList2[3] == "X " && PlayerList2[4] == "X ") {

            if (s2[0] == 'o') {

                s2[0] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[5] == "X " && PlayerList2[6] == "X " && PlayerList2[7] == "X " && PlayerList2[8] == "X " && PlayerList2[9] == "X ") {

            if (s2[1] == 'o') {

                s2[1] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[10] == "X " && PlayerList2[11] == "X " && PlayerList2[12] == "X " && PlayerList2[13] == "X " && PlayerList2[14] == "X ") {

            if (s2[2] == 'o') {

                s2[2] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[15] == "X " && PlayerList2[16] == "X " && PlayerList2[17] == "X " && PlayerList2[18] == "X " && PlayerList2[19] == "X ") {

            if (s2[3] == 'o') {

                s2[3] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[20] == "X " && PlayerList2[21] == "X " && PlayerList2[22] == "X " && PlayerList2[23] == "X " && PlayerList2[24] == "X ") {

            if (s2[4] == 'o') {

                s2[4] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[0] == "X " && PlayerList2[5] == "X " && PlayerList2[10] == "X " && PlayerList2[15] == "X " && PlayerList2[20] == "X ") {

            if (s2[5] == 'o') {

                s2[5] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[1] == "X " && PlayerList2[6] == "X " && PlayerList2[11] == "X " && PlayerList2[16] == "X " && PlayerList2[21] == "X ") {

            if (s2[6] == 'o') {

                s2[6] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[2] == "X " && PlayerList2[7] == "X " && PlayerList2[12] == "X " && PlayerList2[17] == "X " && PlayerList2[22] == "X ") {

            if (s2[7] == 'o') {

                s2[7] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[3] == "X " && PlayerList2[8] == "X " && PlayerList2[13] == "X " && PlayerList2[18] == "X " && PlayerList2[23] == "X ") {

            if (s2[8] == 'o') {

                s2[8] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[4] == "X " && PlayerList2[9] == "X " && PlayerList2[14] == "X " && PlayerList2[19] == "X " && PlayerList2[24] == "X ") {

            if (s2[9] == 'o') {

                s2[9] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[0] == "X " && PlayerList2[6] == "X " && PlayerList2[12] == "X " && PlayerList2[18] == "X " && PlayerList2[24] == "X ") {

            if (s2[10] == 'o') {

                s2[10] = 'x';

                PlayerSecore2++;

            }

        }

        if (PlayerList2[4] == "X " && PlayerList2[8] == "X " && PlayerList2[12] == "X " && PlayerList2[16] == "X " && PlayerList2[20] == "X ") {

            if (s2[11] == 'o') {

                s2[11] = 'x';

                PlayerSecore2++;

            }

        }


        if (PlayerSecore2 == 5) {

            system("cls");

            cout << PleyerName2 << "is winner !!";

            break;

        }

            


        system("cls");


        cout <<

            PleyerName1 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList1[0] << " | " << PlayerList1[1] << " | " << PlayerList1[2] << " | " << PlayerList1[3] << " | " << PlayerList1[4] << " |" << endl <<

            "| " << PlayerList1[5] << " | " << PlayerList1[6] << " | " << PlayerList1[7] << " | " << PlayerList1[8] << " | " << PlayerList1[9] << " |" << endl <<

            "| " << PlayerList1[10] << " | " << PlayerList1[11] << " | " << PlayerList1[12] << " | " << PlayerList1[13] << " | " << PlayerList1[14] << " | " << "Score: " << PlayerSecore1 << endl <<

            "| " << PlayerList1[15] << " | " << PlayerList1[16] << " | " << PlayerList1[17] << " | " << PlayerList1[18] << " | " << PlayerList1[19] << " |" << endl <<

            "| " << PlayerList1[20] << " | " << PlayerList1[21] << " | " << PlayerList1[22] << " | " << PlayerList1[23] << " | " << PlayerList1[24] << " |" << endl <<

            " ------------------------" << endl << endl;

        cout <<

            PleyerName2 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList2[0] << " | " << PlayerList2[1] << " | " << PlayerList2[2] << " | " << PlayerList2[3] << " | " << PlayerList2[4] << " |" << endl <<

            "| " << PlayerList2[5] << " | " << PlayerList2[6] << " | " << PlayerList2[7] << " | " << PlayerList2[8] << " | " << PlayerList2[9] << " |" << endl <<

            "| " << PlayerList2[10] << " | " << PlayerList2[11] << " | " << PlayerList2[12] << " | " << PlayerList2[13] << " | " << PlayerList2[14] << " | " << "Score: " << PlayerSecore2 << endl <<

            "| " << PlayerList2[15] << " | " << PlayerList2[16] << " | " << PlayerList2[17] << " | " << PlayerList2[18] << " | " << PlayerList2[19] << " |" << endl <<

            "| " << PlayerList2[20] << " | " << PlayerList2[21] << " | " << PlayerList2[22] << " | " << PlayerList2[23] << " | " << PlayerList2[24] << " |" << endl <<

            " ------------------------" << endl << endl;

        cout <<

            PleyerName3 << ":" << endl <<

            " ------------------------" << endl <<

            "| " << PlayerList3[0] << " | " << PlayerList3[1] << " | " << PlayerList3[2] << " | " << PlayerList3[3] << " | " << PlayerList3[4] << " |" << endl <<

            "| " << PlayerList3[5] << " | " << PlayerList3[6] << " | " << PlayerList3[7] << " | " << PlayerList3[8] << " | " << PlayerList3[9] << " |" << endl <<

            "| " << PlayerList3[10] << " | " << PlayerList3[11] << " | " << PlayerList3[12] << " | " << PlayerList3[13] << " | " << PlayerList3[14] << " | " << "Score: " << PlayerSecore3 << endl <<

            "| " << PlayerList3[15] << " | " << PlayerList3[16] << " | " << PlayerList3[17] << " | " << PlayerList3[18] << " | " << PlayerList3[19] << " |" << endl <<

            "| " << PlayerList3[20] << " | " << PlayerList3[21] << " | " << PlayerList3[22] << " | " << PlayerList3[23] << " | " << PlayerList3[24] << " |" << endl <<

            " ------------------------" << endl << endl;



        cout << PleyerName3 << ": ";

        cin >> o; // 15


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList1[i]) {

                PlayerList1[i] = "X ";

            }

            else if (o + " " == PlayerList1[i]) {

                PlayerList1[i] = "X ";

            }

        }


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList2[i]) {

                PlayerList2[i] = "X ";

            }

            else if (o + " " == PlayerList2[i]) {

                PlayerList2[i] = "X ";

            }

        }


        for (int i = 0; i < 25; i++) { // 0


            if (o == PlayerList3[i]) {

                PlayerList3[i] = "X ";

            }

            else if (o + " " == PlayerList3[i]) {

                PlayerList3[i] = "X ";

            }

        }


        if (PlayerList3[0] == "X " && PlayerList3[1] == "X " && PlayerList3[2] == "X " && PlayerList3[3] == "X " && PlayerList3[4] == "X ") {

            if (s3[0] == 'o') {

                s3[0] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[5] == "X " && PlayerList3[6] == "X " && PlayerList3[7] == "X " && PlayerList3[8] == "X " && PlayerList3[9] == "X ") {

            if (s3[1] == 'o') {

                s3[1] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[10] == "X " && PlayerList3[11] == "X " && PlayerList3[12] == "X " && PlayerList3[13] == "X " && PlayerList3[14] == "X ") {

            if (s3[2] == 'o') {

                s3[2] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[15] == "X " && PlayerList3[16] == "X " && PlayerList3[17] == "X " && PlayerList3[18] == "X " && PlayerList3[19] == "X ") {

            if (s3[3] == 'o') {

                s3[3] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[20] == "X " && PlayerList3[21] == "X " && PlayerList3[22] == "X " && PlayerList3[23] == "X " && PlayerList3[24] == "X ") {

            if (s3[4] == 'o') {

                s3[4] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[0] == "X " && PlayerList3[5] == "X " && PlayerList3[10] == "X " && PlayerList3[15] == "X " && PlayerList3[20] == "X ") {

            if (s3[5] == 'o') {

                s3[5] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[1] == "X " && PlayerList3[6] == "X " && PlayerList3[11] == "X " && PlayerList3[16] == "X " && PlayerList3[21] == "X ") {

            if (s3[6] == 'o') {

                s3[6] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[2] == "X " && PlayerList3[7] == "X " && PlayerList3[12] == "X " && PlayerList3[17] == "X " && PlayerList3[22] == "X ") {

            if (s3[7] == 'o') {

                s3[7] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[3] == "X " && PlayerList3[8] == "X " && PlayerList3[13] == "X " && PlayerList3[18] == "X " && PlayerList3[23] == "X ") {

            if (s3[8] == 'o') {

                s3[8] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[4] == "X " && PlayerList3[9] == "X " && PlayerList3[14] == "X " && PlayerList3[19] == "X " && PlayerList3[24] == "X ") {

            if (s3[9] == 'o') {

                s3[9] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[0] == "X " && PlayerList3[6] == "X " && PlayerList3[12] == "X " && PlayerList3[18] == "X " && PlayerList3[24] == "X ") {

            if (s3[10] == 'o') {

                s3[10] = 'x';

                PlayerSecore3++;

            }

        }

        if (PlayerList3[4] == "X " && PlayerList3[8] == "X " && PlayerList3[12] == "X " && PlayerList3[16] == "X " && PlayerList3[20] == "X ") {

            if (s3[11] == 'o') {

                s3[11] = 'x';

                PlayerSecore3++;

            }

        }


         if (PlayerSecore3 == 5) {

            system("cls");

            cout << PleyerName3 << " is winner !!";

            break;

        }

        

        

    }


}

Studio Description | وصف الاستوديو

Sima Al Kanawati

نعيش اليوم في عالم رقمي متجدد و متغير، فقد أصبح خلف جميع ما يحيط بنا من أعمال و تجارة و تسوق و علوم و اختراعات و صحة و طيران و حكومات برمجيات تديرها وتتحكم بها لذلك أصبحت البرمجة هي من العلوم الأساسية وأصبح تعلمها هو جزء أساسي لمواكبة التطور و تعلم أسس الذكاء الاصطناعي التي تعد البرمجة هي الركيزة الأساسية له وفي سياق متصل  فالبرمجة تعلمنا ان نفكر بنفس الطريقة التي تعمل بها الآلات  لذلك  فالمبرمج هو مفكر بالدرجة الأولى. 

في هذا الاستديو سيقوم الطلاب عن طريق لغة البرمجة c++ language بكتابة الألعاب التفاعلية التنافسية التي تمكن المستخدمين من لعبها وفي الوقت ذاته سيقوم الطلاب ببناء البرنامج (اللعبة) اللوحية التي تمت برمجتها عن طريق جميع المواد المتاحه وإضافة قسم للتطوير في الخطة التالية.

Today we live in a renewed and changing digital world, as it has become behind all that surrounds us in terms of business, commerce, shopping, science, invention, health, aviation and government’s Software that manages and controls it, so programming has become one of the basic sciences and its learning has become an essential part to keep pace with development And learning the foundations of artificial intelligence, which programming is the main pillar of it, and In a related context, programming teaches us to think in the same way that machines work, so a programmer is a thinker in the first place.

In this studio, students will, using the c++ language, write competitive interactive games that enable users to play, and at the same time students will build models that simulate the program (the game)”boardgame” that was programmed with all available materials.

Today, we live in an evolving and changing digital world. Behind all that surrounds us - in terms of business, commerce, shopping, science, invention, health, aviation and governments - are pieces of software that manage and control it. So, programming has become one of fundamental science and learning it has become essential to keep up the pace with development. As such, learning the foundations of artificial intelligence, of which programming is the main pillar, programming teaches us to think in the same way machines work, so a programmer is primarily a thinker.

In this studio, students shall, using the c++ language, write competitive interactive games that enable users to play, and at the same time students will build models that simulate the program (the game)”boardgame” that was programmed using all available materials while adding a part to be developed it in the next plan.

نعيش اليوم في عالم رقمي متجدد ومتغير، فقد أصبح خلف جميع ما يحيط بنا من أعمال، وتجارة، وتسوق، وعلوم، واختراعات، وصحة، وطيران وحكومات برمجيات تديرها وتتحكم بها. لذلك أصبحت البرمجة من العلوم الأساسية وأصبح تعلمها جزء أساسي لمواكبة التطور. كذلك تعلم أسس الذكاء الاصطناعي حيث البرمجة ركيزته الأولى يعلّمنا التّفكير بنفس الطريقة التي تعمل بها الآلات، لذا المبرمج هو مفكر بالدرجة الأولى

في هذا الاستديوسيقوم الطلاب عن طريق لغة البرمجة c++ languageبكتابة ألعاب التفاعلية التنافسية التي تمكن المستخدمين من لعبها وفي الوقت ذاته سيقوم الطلاب ببناء البرنامج (اللعبة) اللوحية التي تمت برمجتها عن طريق جميع المواد المتاحة وإضافة قسم للتطوير في الخطة التالية.