I knew that already!
Also, I got confused and thought that they said Al, as in AL.
Ahhh, mistook the uppercase I for an lowercase L
Glad to help either way I guess.
Ok. Sorry about how long this took me to reply. I didn’t have time yesterday. I sort of understood most of that. Would it really be any simpler than what I currently have if I had an object that played all the cards? I managed to fix the -1 bug.
Great. Is there any other problem?
It would be simpler if you move everything that changes the current card into a single place, yes, but it might be easier to continue with what you have if you found the bug already and don’t expect to have trouble finding more.
There’s one other bug where the AI will play a completely random card, but it’s pretty rare. The rest of the bugs are probably going to come when I make it so you can scroll through your cards (once the draw card feature is available).
How do you know it is random?
I don’t. I’m just assuming it is. On a rare occasion it will play a card that has a completely different color and number than the previous card. I’m not sure why it does that.
On another note, do you know how I could make it so you could draw an unlimited amount of cards, and the AI also could?
Yes, I do!
I’ve actually done something similar in my scrabble project.
First, you need to redefine what a card is. Currently it is two times the amount of cards variable, card n color and card n number. Each card uses different variables, and requires different code to use.
But each card ony uses 2 variables each, color and number. So lets say that instead of 2 variables floating around, only associated with each other by their names, a card is an object. To create a card, we create a clone of some object. This clone is a card. It has a self color and a self number. You set it to the correct amount of colors/numbers then shuffle the order the clones will be drawn in, assuming they start outin cloning order, which should also be used to determine what card it is. When a card is drawn, you remove that card from the undrawn cards and add ot to the player who drew it’s cards.
Try to figure this out, if you have trouble coding it let me know and I’ll explain a little more.
Oh, ok. That makes sense. Can I have a link to your scrabble project? Thanks for all the help!
I can’t find it. It’s either filtered or I never published it. I assume it’s the second option, since I don’t think I ever finished the design. I’ll search my drafts for it.
It’s all right, you don’t have to.
Yes he does
Wow this is complicated to implement…
Not really. What are you trying and what are the main problems?
It’s just a lot of variables and checks. I think I understand it, though.
What variables? What do they do? WHat are you checking?
The newest variables are:
CUP - Current Card Up - the card at the top of the draw pile
CDCN - Current Drawn Card Number - the number of the card you just drew
CDCC - Current Drawn Card Color - the color of the card you just drew
Self ID - for the clones to keep track of their number
Self C - for the clones to keep track of their color
Self SO - Self Shuffle Order - what it’s order is in the deck
And how do you draw cards?
How do you shuffle them? I had some difficulty ith that and got a very slow and not very good result.
You can’t draw cards yet. Currently I’m working on making the dealer.
Couldn’t you just have each clone set it’s shuffle order to a random number between 1 and 108 (cards in a Uno deck)? Just realized the problem in that…