Advanced card game

I just started Programing this year in class, and was given an assignment to shuffle a deck of cards. Well I did so and know I would like to make a game out of the modified card shuffle i made from the shuffle program that i have made. Can any one help me understand how to make the rules of the game? Also how do I put it into graphics? The card game is very complicated and I'm not sure what to do for the rules and choses I had in mind for it but would like it to run fast in graphics without major lag.

Here is my shuffle code.

#include <string>
#include <iostream>
#include <stdlib.h>
#include<time.h>
using namespace std;

int main()
{
system ("clear");
int a, x, swap, cards [40];
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////BEFORE
cout << "Before\n";
for(x=0;x<40;x++)
{
cards[x]=x+1;
cout << cards[x]<<" ";
}
cout << "\n";
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////SHUFFLE
srand(time(NULL));
for(x=0;x<40;x++)
{
a=rand()%40;
swap=cards[a];
cards[a]=cards[x];
cards[x]=swap;
}
cout << "\n";
///////////////////////////////////////////////////////////////////////////////////////////////////////////////AFTER
cout << "\nAfter\n";
for(x=0;x<40;x++)
{
switch (cards[x])
{
//Monsters-Normal
case 1:
cout << "Harpies Brother ";
break;

//Monsters-effect
case 2:
cout << "Harpie Lady Sisters ";
break;

case 3:
cout << "Harpie Lady Sisters ";
break;

case 4:
cout << "Harpie Lady Sisters ";
break;

case 5:
cout << "Harpie Lady ";
break;

case 6:
cout << "Harpie Lady ";
break;

case 7:
cout << "Harpie Lady ";
break;

case 8:
cout << "Harpie Queen ";
break;

case 9:
cout << "Swift Birdman Joe ";
break;

case 10:
cout << "Sonic shooter ";
break;

case 11:
cout << "Familiar - Possessed - Wynn ";
break;

case 12:
cout << "Harpie Lady ";
break;

case 13:
cout << "Harpie Lady ";
break;

case 14:
cout << "Harpie Lady ";
break;

case 15:
cout << "Swift birdman joe ";
break;

case 16:
cout << "Harpies pet baby dragon ";
break;

case 17:
cout << "Harpies pet baby dragon ";
break;

case 18:
cout << "Birdface ";
break;

case 19:
cout << "Storming Wynn ";
break;

//Spell
case 20:
cout << "A feather of the phoenix ";
break;

case 21:
cout << "Elegant egotist ";
break;

case 22:
cout << "Elegant egotist ";
break;

case 23:
cout << "Elegant egotist ";
break;

case 24:
cout << "Brain control ";
break;

case 25:
cout << "Smashing ground ";
break;

case 26:
cout << "Triangle ecstasy spark ";
break;

//Spell-Equip
case 27:
cout << "Axe if despair ";
break;

case 28:
cout << "Big bang shot ";
break;

//Spell-Field
case 29:
cout << "Harpies Hunting ground ";
break;

case 30:
cout << "Harpies Hunting ground ";
break;

//Trap
case 31:
cout << "Sakuretsu armor ";
break;

case 32:
cout << "Jar of greed ";
break;

case 33:
cout << "Icarus attack ";
break;

case 34:
cout << "Compulsory evacuation device ";
break;

case 35:
cout << "Waboku ";
break;

case 36:
cout << "Spiritual wind art - Miyabi ";
break;

//Trap-continuous
case 37:
cout << "Hysteric party ";
break;

//Trap-quick play
case 38:
cout << "Magic jammer ";
break;

case 39:
cout << "Negate attack ";
break;

case 40:
cout << "Seven tools of the bandit ";
break;
}
}

cout << "\n";
return 0;
}
Yes I know it is really long and wish to make it shorter but I still need to add a lot more than what I have now. Also I would like to make it so you can see the details of the cards when you click on the info on a selection window if possible.
Last edited on
I just started Programing this year

...
Also how do I put it into graphics? The card game is very complicated and I'm not sure what to do for the rules and choses I had in mind for it but would like it to run fast in graphics without major lag.


This isn't the advice you're going to want to hear, but it's the best advice for you to take at this point: You are biting off more than you can chew right now. A complicated graphical card game is beyond your current abilities. Learn to crawl before you walk, and learn to walk before you run.

1. Stick with the class. Do all the assignments. Do any additional extra credit that is available.
2. Write some simple text based games of some sort. Hangman, tic-tac-toe, Blackjack, nothing more ambitious than that.
3. Write some simple graphics based games of some sort. Hangman, tic-tac-toe, Blackjack, nothing more ambitious than that.

Then you can start getting a little more ambitious.
Topic archived. No new replies allowed.