an error

Discussion in 'Software' started by random guy, Feb 11, 2006.

  1. random guy

    random guy Private E-2

    hey guys, i am new here, and a little new to programming.

    i am working on a c++ command line card game and it is going fairly well but i am running into a few problems that i dont know how to fix.

    see what i got so far is that a deck of cards is made, shuffled and dealt. then it is player 1's turn to put in a card and then comes 3 computer players. the only rule i got is that to play a new card it must be of a higher value than the center card which was played by the previous person. if the player doesnt have a card higher than the one on top of the pile he can pass. if everyone passes then the centercard is thrown away and any card can be put in its place. the different suites have no significance right now.

    my problem is with the AI players. sometimes they play cards that are lower than the card in the center. ex: card on top of pile is a 5 of hearts and the computer player plays a 4 of clubs. it shouldnt but somehow it does.

    thanks for the help.

     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds