|
Post by NewForQbasic on Aug 26, 2006 0:00:16 GMT
I AM NEW FOR QBASIC...............SO DON'T KNOW MUCH ABOUT IT........I NEED HELP WIHT MY VINGT-ET-UN GAME ........IT'S A CARD GAME JUST LIKE BALCK-JACK..........AND SOME ANOTHER POKAER GAME........I DON'T KNOW HOW TO RANDOMISE THE NUMBER IN THE GAME AND THE SUITES LIKE HEART,CULBS...ETC........HELP NEDED QUICKLY.......I REALLY APPRICITED SOMEONE HELP..........
|
|
|
Post by Mikrondel on Aug 26, 2006 9:30:15 GMT
Quoting from the forum guidelines: "Include as much detail in your questions as you can to make it easier for us to help you."
I would also advise you to be considerate and not use all capital letters. The best way to make us respect you is if you respect us and our time.
However I will still try my best to help.
The QBasic function 'RND' returns a number somewhere between 0 and 1. To obtain a random integer between two arbitrary integers, say LOW and HIGH such that LOW is the smallest one possible and HIGH is the largest one possible, we use the general formula INT( RND * (HIGH - LOW + 1) ) + LOW
For example, a number between 4 and 8: INT( RND * (8 - 4 + 1) ) + 4 or INT( RND * 5 ) + 4
If you are using an array of cards, DO NOT use random cards; rather place the cards in order and then shuffle them by using the SWAP command. (I.e. swap each card with a random card.)
PRINT CHR$(3) (and 4, 5, 6) should produce the symbols for card suits.
If you want more help, please, provide as much information as you can and be polite.
|
|
|
Post by NewForQbasic on Aug 26, 2006 14:12:47 GMT
Hey...........I am sorry about short and incomplete information............Just am newbie for Qbasic.......I have to make this game called vingt-et-un (twenty one).......It's a program that deals two cards to a single player and two cards to a dealer from a 52 card deck (4 different suits of card)......Based on the value of the two cards for each player,determine a winner......So my simple problem is that i don't know how to randomize number and sute and determine a winner.................I really appricited your help................
|
|
|
Post by Mikrondel on Nov 17, 2006 9:57:00 GMT
Don't be too patronising, homeloaf. You never know what kind of disabilities people may actually have. And forum etiquette isn't obvious to some of those who are new to this.
|
|
|
Post by Homeloaf on Nov 18, 2006 5:18:34 GMT
I portray a mentally deficient individual in the up-coming play at our school. We're doing "The Boys Next Door," by Tom Griffith. I'm Lucien P. Smith. It's pretty cool.
The hard part isn't taking it seriously, as you might think. The hard part is not killing people who don't.
As to forum etiquette, I won't quarrel there. I've done some pretty stupid stuff as well. NewForQbasic, don't be discouraged. My mocking was inappropriate, and I whole heartedly welcome you into our online community.
|
|
|
Post by earlofqb on Nov 18, 2006 22:11:58 GMT
Well, I deleted it, hopefully before s/he saw it.
|
|
|
Post by Homeloaf on Nov 19, 2006 4:15:24 GMT
I didn't even think of that. Thx for attempting to save me some embarrassment, and perhaps not scarzing (si, scarzing) away another user.
|
|