Re: deciphering a crazy party battle
@1: Here are my thoughts:
1: Is the player a variable or a class?
A player is most likely a class. More over, I believe that a player is the same for minigames and battle. However, since bgt does not have variable restrictions a player could also be a simple variable, like so:
int health=30;
int type;
This would work, because the only thing we need to check is player's health. No timers, no attacks or defenses, just 2 variables. However, it is highly unlikely a player's health is not within the player class.
2: Does each card have an ID number for the randomizer?
You got it. I'm guessing that the cards do have the ID to be picked. That, or we have an array that contains only cards that are in your deck and we can pick random objects from the array, not the actual card list.
3: How do you set up flags and how does the randomizer know what card to draw next without choosing an already discarded one?
I'll give a more extensive explanation here. What could be happening is when you draw a card an object is moved from an array containing your deck to the discarded list. The random number generator, AKA the RNG now has one less things to pick from. It will not pick the same object, because it can't do so.
Imagine we have a list that contains numbers 1 through 10. Our list is 10 values long, so the lowest we want is 0 (the first item in most of coding languages when it comes to an array) to 9 (the highest item in the array). After that, we access the object stored within the list, use it to, say, do damage, and then remove and resize the array. Next time we draw, we have to choose between 0 and 8 (or array.length()-1), and so on.
As for setting up flags, I'm not sure what you mean. If we setup an environment, we simply change a variable, be it integer or a string (probably an int). Where the variable is stored is only known to the coder, but it could be anywhere. In the player class, outside of it... really, anywhere. Without more explanation as to what you mean when you say "Set up flags" I can't help you.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector