I really need some help with understanding how to do the logic for this card game. It's quite complicated and I've been trying to do it all day and it's due in some hours..It's a lot of code but the...
Type: Posts; User: Amrita Ramnauth
I really need some help with understanding how to do the logic for this card game. It's quite complicated and I've been trying to do it all day and it's due in some hours..It's a lot of code but the...
I'm trying to check an integer array if it's empty. I stored ROGUE values in the array where should be empty and I'm not getting to check if my array is empty or not. Someone please help
...
The card game I'm creating is for two players, one user and the other player will be the computer. In general, this is what is suppose to happen:
The player starts off the game then the computer...
But quick question, how can I clear the contents of an integer array?
Setting it to zero won't be useful in this case because 0 sets the array to a value.
I want to make the array empty well o.o
It works now. (y) Thanks
I'm trying to do as you said with running a count by checking through a second array but I'm running into some problems. Here, a card could have faces in the range 0-12. I'm setting all the values in...
Thank you Think I got it now. :)
Yes the vaild input is always non-negative in my case. But could you go back to the second array part. I lost you there.
Thank you
I can loop through the array to see if any value is higher than the integer I specify. The part that I'm not getting is how I store all the larger values and how and I wanna keep track of the number...
I have a project to submit in two days and I can't wrap my mind around something...Kindly help
I have a variable storing a number, say int i=5
I have an array of about 10 numbers stored and I...
Yes the program reads the .txt file
That's what I meant
My bad
Hmm I see
Thanks
I can get to sort up to 100,000
I'm trying to sort 500k random numbers in my codeblocks compiler which I call from a .txt file. When I run the program it just gives me a blinking pointer to the top and does nothing. Any idea of...
Yes it's like the selection sort but it's not as efficient as the selection sort. And the algorithm you posted for it is correct.
I just wanted to know if that sort exists and what's the name of it...
I have an
array[4] = {5, 3, 9, 1}
I compare the first index with the second and if the second index is smaller then I'll swap the first index with the second.
After 1st pass I get:
{3, 5,...
I'm having some problems with creating a card game known as President. Part of the game requires me to grab the highest card from Hand4 and place it in Hand1 then grab the lowest card in Hand1 and...
Yes I realised it was answered already...thanks :)
I haven't even come across that yet...
I've reached to a point where I have my deck of cards and now I'm trying to shuffle the cards right in the deck then share the cards. I have a shuffle function but it's not working as I intend for it...
Never understood the difference. I got it now. Thanks (y)
I understand what's going on now but one question, for line 55, why ++i and not i++?
I've created a deck array and I'm running into a problem when I want to print my cards with their suit and face.
Here is the code:
#include<stdio.h>
#include<stdlib.h>
#include<time.h>...
I think I'll work with an array of struct. Thanks for the feedback
I'm doing a card game which requires me to create a deck of 52 cards, shuffle the deck then share the cards to 4 players (13 cards in each player's hand). From my understanding, I wanted to use a...