Need help with C# semester project

Tarun

Intermediate
May 29, 2013
147
0
21
5híkàrpûr
Hey guys. My brother is doing CS and the project is need to be done in console application.

He needs to make a game or a simple application for this assignment, can you suggest me something that I can tell him?
 

ammarzubair

Perverted Gentleman
Feb 15, 2009
1,690
0
41
Karachi
If you give me that code. It would be awesome.
Code:
#include <iostream>#include <stdlib.h>
#include <conio.h>
using namespace std;


int main()
{
     char csq1('1');
     char csq2('2');
     char csq3('3');
     char csq4('4');
     char csq5('5');
     char csq6('6');
     char csq7('7');
     char csq8('8');
     char csq9('9');
     char cplmark;
     int turn(2);
	 int a(2);
     bool bgameover(true);


               cout << csq1 << "|" << csq2 << "|" << csq3 << endl;
               cout << "-+-+-" << endl;
               cout << csq4 << "|" << csq5 << "|" << csq6 << endl;
               cout << "-+-+-" << endl;
               cout << csq7 << "|" << csq8 << "|" << csq9 << endl;


     do
     {
          if(turn%2==0)
          {
                       cplmark='X';
          }
          else
          {
                       cplmark='O';
          }


          bool bvalidmove;
          do
          {


               bvalidmove= true;
               char cnextmove;
			   cout << endl << "Player" << (turn%2)+1 << "'s move:" << endl;
               cnextmove=getche();
               if(cnextmove=='1' && csq1=='1')
               {                 csq1=cplmark; }
               else if(cnextmove=='2' && csq2=='2')
               {                 csq2=cplmark; }
               else if(cnextmove=='3' && csq3=='3')
               {                 csq3=cplmark; }
               else if(cnextmove=='4' && csq4=='4')
               {                 csq4=cplmark; }
               else if(cnextmove=='5' && csq5=='5')
               {                 csq5=cplmark; }
               else if(cnextmove=='6' && csq6=='6')
               {                 csq6=cplmark; }
               else if(cnextmove=='7' && csq7=='7')
               {                 csq7=cplmark; }
               else if(cnextmove=='8' && csq8=='8')
               {                 csq8=cplmark; }
               else if(cnextmove=='9' && csq9=='9')
               {                 csq9=cplmark; }
               else
               {
                                 bvalidmove=false;
               }


               system("cls");
               cout << csq1 << "|" << csq2 << "|" << csq3 << endl;
               cout << "-+-+-" << endl;
               cout << csq4 << "|" << csq5 << "|" << csq6 << endl;
               cout << "-+-+-" << endl;
               cout << csq7 << "|" << csq8 << "|" << csq9 << endl;
               }
               while(!bvalidmove);


               bgameover= false;
               bool bwingame= true;


               if(csq1!='1')
               {
                            if(csq1==csq2 && csq2==csq3)
                            {             bgameover= true;  }
                            if(csq1==csq4 && csq4==csq7)
                            {             bgameover= true;  }
               }


               if(csq5!='5')
               {
                            if(csq1==csq5 && csq5==csq9)
                            {             bgameover= true;   }
                            if(csq3==csq5 && csq5==csq7)
                            {             bgameover= true;   }
                            if(csq2==csq5 && csq5==csq8)
                            {             bgameover= true;   }
                            if(csq4==csq5 && csq5==csq6)
                            {             bgameover= true;   }
               }


               if(csq9!='9')
               {
                            if(csq3==csq6 && csq6==csq9)
                            {             bgameover= true;   }
                            if(csq7==csq8 && csq8==csq9)
                            {             bgameover= true;   }
               }


               if (csq1 != '1' && csq2 != '2' && csq3 != '3' &&
               csq4 != '4' && csq5 != '5' && csq6 != '6' &&
               csq7 != '7' && csq8 != '8' && csq9 != '9' && !bgameover)
               {
                        bgameover = true;
                        bwingame = false;
               }


				if(bgameover)
				{
					if(bwingame)
					{
						cout << endl << "Player " << (turn%2)+1 << " WINS!!!" << endl;
					}
					else
					{
						cout << endl << "It's a TIE!!! " << endl;
					}




					cout << endl << "Game OVER!!" << endl;
					cout << endl << "Do you want to play again? (Y/N) " << endl;
					char cagain;
					cagain=getche();


					if(cagain=='Y' || cagain=='y')
					{
						bgameover= false;
						system("cls");
						csq1='1';
						csq2='2';
						csq3='3';
						csq4='4';
						csq5='5';
						csq6='6';
						csq7='7';
						csq8='8';
						csq9='9';
						cout << csq1 << "|" << csq2 << "|" << csq3 << endl;
						cout << "-+-+-" << endl;
						cout << csq4 << "|" << csq5 << "|" << csq6 << endl;
						cout << "-+-+-" << endl;
						cout << csq7 << "|" << csq8 << "|" << csq9 << endl;
						turn+=2;
					}
				}


				turn++;


				if(bgameover)
				{
					if(!bwingame)
					{
						a++;
						turn=a;
					}
				}
     }
     while(!bgameover);








     system("PAUSE");
     return EXIT_SUCCESS;
}
 

SohaibArif

Proficient
Apr 10, 2008
666
0
21
Karach,i Pakistan
A simple(just entering and searching data) database front end can easily be made in C#.
Took me less than 1 week from scratch, starting from C++ background(not knowing C#).
 
General chit-chat
Help Users
We have disabled traderscore and are working on a fix. There was a bug with the plugin | Click for Discord
  • No one is chatting at the moment.
  • Necrokiller Necrokiller:
    Jeez, throwing all those sales away for the sake of PsN accounts. What a mess.
    Link
  • Link
  • Chandoo Chandoo:
    faraany3k said:
    I have heard that it is now unplayable in countries which do not support handful of third world countries not recognized by Sony like Pakistan. Steam is a true global platform.Then they cry that console gaming is dying.
    170 + countries where Steam sells but PSN doesn't will lose access unless they use VPN
    Link
  • Chandoo Chandoo:
    It has a worst rating on Steam than last years MW3 now. Jeese Sony, how can you fuck it up THIS BAD
    Link
  • faraany3k faraany3k:
    I have heard that it is now unplayable in countries which do not support handful of third world countries not recognized by Sony like Pakistan. Steam is a true global platform.Then they cry that console gaming is dying.
    Link
  • Chandoo Chandoo:
    How to ruin a perfectly good thing for dummies - by Sony
    Link
  • Link
  • Chandoo Chandoo:
    Helldivers 2 is now trending worse stream user reviews than SUICIDE SQUAD
    Link
  • Necrokiller Necrokiller:
    Good guy Gaben refunding the game way past what the policy allows 👍
    Link
  • Necrokiller Necrokiller:
    Poor Arrowhead getting screwed by Sony 😞
    Link
  • Necrokiller Necrokiller:
    Gaben ki reach hai, PSN ki nahi hai. Gaben ain't stressing over publishers who rush to his store in the first place 😂
    Link
  • Chandoo Chandoo:
    Gaben ki reach nah hai :(
    Link
  • Chandoo Chandoo:
    saeen I don't think the PSN teams are stressing over needing to offer hundreds of thousands of refunds lol
    Link
  • Necrokiller Necrokiller:
    fuckin' lol
    Link
  • Necrokiller Necrokiller:
    Saeen literally glossed over the fact that PSN isn't available in those 177 countries
    Link
  • Chandoo Chandoo:
    fuckin' lol
    Link
  • Chandoo Chandoo:
    Helldivers 2 delisted on Steam from 177 countries
    Link
  • Necrokiller Necrokiller:
    iampasha said:
    Alan wake 2 is yet to recover it's development costs. Due to no physical release and no steam launch.
    You reap what you sow. This is what happens when you take away choice from consumers. Even with 88% split going to developers, they can't recoup costs. Meanwhile, Helldivers 2 is a massive hit for Sony thanks in big part to Steam.
    Link
  • iampasha iampasha:
    Alan wake 2 is yet to recover it's development costs. Due to no physical release and no steam launch.
    • Haha
    Reactions: Necrokiller
    Link
  • NaNoW NaNoW:
    ....
    Link
  • faraany3k faraany3k:
    Tears of Kingdom saal pehle shuru ki thee, ab tk pehle area se nai nikla. Life sucks donkey balls.
    Link
  • Necrokiller Necrokiller:
    Buh buh buh didn't you know that "sT3aM iS a moN0-pololly" 🤣
    • Haha
    Reactions: iampasha and EternalBlizzard
    Link
  • EternalBlizzard EternalBlizzard:
    You can't defeat Lord Gaben :ROFLMAO:
    • Haha
    Reactions: Necrokiller
    Link
  • Necrokiller Necrokiller:
    Hmmmmm
    Link
  • Necrokiller Necrokiller:
    Link
    Necrokiller Necrokiller: Jeez, throwing all those sales away for the sake of PsN accounts. What a mess.