I am a newbie

Well i was just reading a book named c++ primer and got bored so i just wanted to create a c++ consol game

just for some fun

I have created this thing any more idea and some repair in code?

void welcome()
{
        cout<<"Welcome to the simplest game by thapchi corporations limited";
                cout<<"\n \t \t press enter to continue....";
                getchar();
                system("cls");
                
                
}

int main()
{
        welcome();
        char move;
        char map[49]="**********\n*****j****\n**********\n********** \n";
        cout<<map;
                                         cin>>move;
                                         
                                         
                        if(move=='w')
                        {
                                system("cls");
                                cout<<"****j*****\n**********\n**********\n**********";
                  getchar();
                        }
                        cin>>move;
                        if(move=='a')
                        {   system("cls");
                                cout<<"**j******\n**********\n**********\n**********";
                                getchar();
                        }
                        cin>>move;
                        if(move=='s')
                        {
                                system("cls");
                                cout<<"**********\n**j******\n**********\n**********";
                                getchar();
                        }
                        cin>>move;
                        if(move=='d')
                        {
                                system("cls");
                                cout<<"**********\n******j***\n**********\n**********";
                                getchar();
                        }
                        getchar();
        return 0;
}

Hey.
Uhm, you have to tell us if theres anything that needs a 'repair'? Is it not working, or?
I have no clue what it is, if I were to come with improvements, I'd like to know a bit more what you're trying to achieve? A card game, or something?

Note: "thapchi corporations limited" appears to be a name - that means you gotta start with a capital letter :) Just a hint, if you're going to sell pro console games, you must be able to type your name correctly :D

I don't really understand what the game does. Maybe you could have the if-statements in a loop so that one can keep moving?

This article has been dead for over six months. Start a new discussion instead.