Making a card game... And im lost

Hi there
Im new into GS, but made a VERY small app yday, where it changed sence and that was it
I wanna try make a card game to try my self off a little..
what i need, is that my Actor: card, needs to load a random card when the game starts. then theres a higher and a lower botton, when i press the lower botton, a new random card needs to be showed in actor: card, and some text in the top tells me if that new card is lower or higer then the card before that..
and the same with the higher botton.
hope this aint to complicated and someone can help me how i can do this..
thanks a lot
Im new into GS, but made a VERY small app yday, where it changed sence and that was it

I wanna try make a card game to try my self off a little..
what i need, is that my Actor: card, needs to load a random card when the game starts. then theres a higher and a lower botton, when i press the lower botton, a new random card needs to be showed in actor: card, and some text in the top tells me if that new card is lower or higer then the card before that..
and the same with the higher botton.
hope this aint to complicated and someone can help me how i can do this..
thanks a lot

Comments
just some finger points would help
i have made 52 int's for every card, names: h1, value: 1 (harts es) and so on..
is this a good or bad why to do it ?
Sounds like your are making something like what i've done with my Blind Man's Bluff game
http://itunes.apple.com/us/app/blindmansbluff/id366884987?mt=8
except you want it to check if it was a high card or low card..
What i did to randomize the 1 card is have a game.randomcard attribute
Then in a Button Actor --
Rule - When button is touched
Change Attribute: game.randomcard To: random(1,52)
Spawn Actor - (cardisplay) is the name of my card actor which is 252x384 pixel size for card
Then in carddisplay actor
Change Attribute: self.image To: floor(game.randomcard)..".png"
The floor part will load my card images.. I have 52 images (not actors) that i've named by numbers like -
2 of Hearts is a 12.png file 6 Clubs is 22.png file, 10 of Jacks is 3.png
this way i think it gives it a little bit more randomizing vs. just starting with A of hearts is 1.png, A of Spades is 2.png, etc..
However, in your case where it looks like you want to create a rule to see if a High card was drawn or a Low card was drawn I probably would recommend you number your images in order starting with like/example 2H is 1.png, 2C is 2.png, 2D is 3.png, 2S is 4.png, 3H is 5.png, etc...
you'll just have to put a rule in on the card that says IF game.randomcard is < then 25
then display text = LOW CARD...
--Otherwise display text = HIGH CARD
something like that.
Hope this helps.
cant believe i have starred at the screen for like 2-3 hours tryed to figger out how to get a random card picked xD
this really helped a lot ! thanks !
I'm seeing how things can be much more object oriented and data driven now! Legend.