1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Help in card game

Discussion in 'C' started by cvirus, Apr 25, 2007.

  1. cvirus

    cvirus New Member

    Joined:
    Apr 10, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hello, I´m needing help for a program that I´m going to do.

    The program is a card game and we must have 40 cards, and all the cards must be hiden when the player chose de position of the card she must apear so that he contin. to play and if the player do a sequence all that cards go away and the player 2 plays.

    Any ideas? Please
     
  2. cvirus

    cvirus New Member

    Joined:
    Apr 10, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    #include <iostream.h>
    #define altura 10
    #define largura 4
    
    int main()
    {
        int i,j,pares=0;
        int jogo [altura][largura];
        for (j=1;j<=largura;j++)
        cout<<"\t"<<j<<"";
        cout<<"\n\t";
        for (i=1;i<=altura;i++)
        cout<<"\t\n"<<i<<"\t[x]\t[x]\t[x]\t[x]"<<"";
        cout<<"\n\t\n";
    
        
        system("pause");
    } 
    
    
    I have started like this, now i have to put 20 pares of 1,2,3 etc, behind the [X] and when the player chose the coordenates the [x] turns and shows the number behind.
     

Share This Page