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.
  • faraany3k faraany3k:
    Which Franchise has 5 releases but only two games. Last of Us
    Link
  • faraany3k faraany3k:
    Shadowdragoo said:
    no idea how that is a steal by wasting 3500 rupees per month and for games that are removed before you can finish them off.xbox gamepass is garbage with no local prices
    why you are paying american rates in Pakistan. Search cheaper region like Turkey. 13k for 13 months. Ms does not care
    Link
  • Link
  • S Shadowdragoo:
    no idea how that is a steal by wasting 3500 rupees per month and for games that are removed before you can finish them off.xbox gamepass is garbage with no local prices
    Link
  • faraany3k faraany3k:
    Just finished Diablo 4 season in hurry to play Fallout 4 but gamepass released another banger in the form of Star Wars on April 25th. Gamepass is a steal man.
    Link
  • Necrokiller Necrokiller:
    EternalBlizzard said:
    Is it just me or people lately seem to defend every bad game design decision made by the devs and try to give bullshit reasons for that? Or perhaps it's because I'm on reddit and discord :ROFLMAO:
    There are no such thing as "bad design" bro, its all "artistic vision" now :ROFLMAO:
    • Haha
    Reactions: EternalBlizzard
    Link
  • EternalBlizzard EternalBlizzard:
    Is it just me or people lately seem to defend every bad game design decision made by the devs and try to give bullshit reasons for that? Or perhaps it's because I'm on reddit and discord :ROFLMAO:
    • Haha
    Reactions: Necrokiller
    Link
  • B Baghi:
    vos
    Link
  • Link
  • G gorillageneral:
    It's me cattoboee
    Link
  • G gorillageneral:
    It's me tattooed
    Link
  • Link
  • C cattoboee:
    testing
    Link
  • NaNoW NaNoW:
    true
    Link
  • faraany3k faraany3k:
    Add 20 years into your age. Congrats you are in Playstation 8 era. Probably a VR streaming headset in a form of glasses.
    Link
  • S Shehryar89:
    Hi any repair shop for Nintendo Switch in Isb/ Rwp? The console is not charging. Anybody? Who can help in this regard.
    Link
  • iampasha iampasha:
    Ewww brother ewww, what's that brother? Whats that?
    Link
  • Necrokiller Necrokiller:
    Senua Saga 30fps both on Series S and X. Gotta feel bad for the Series X owners.
    Link
  • Necrokiller Necrokiller:
    Imagine buying a Pro console and still getting 30fps in GTA 6 😬
    Link
  • faraany3k faraany3k:
    So this console gen was like putting a SSD in an old laptop
    Link
  • LordIT LordIT:
    does anyone know a reliable vendor in lahore for laptop batteries?
    Link
  • XPremiuM XPremiuM:
    I remember when PG used to be such an active site. Now it's barely alive.
    Link
  • XPremiuM XPremiuM:
    Any mods online?
    Link
  • NaNoW NaNoW:
    .....
    Link
  • Link
    faraany3k faraany3k: Which Franchise has 5 releases but only two games. Last of Us