if Bob wins, all 10 go to bottom of pileBob. if Abe wins, all 10 cards go to bottom of pileAbe. If a battle occures, certain things will happen (see #3 below)Ī.) get 4 cards from each pile (including the first card.so a total of 5 from each pile) If Bob wins the turn, then the won cards go to the bottom of pileBob. both players put down one card).Ģ.) If Abe wins the turn, then the won cards go to the bottom of pileAbe. If you were to run this, it would display one turn of war (e.g. Private Vector pileBob = new Vector(30,22) //increment by 22 if needed Private Vector pileAbe = new Vector(30,22) //set capacity at 30 ![]() the lowest value is the ace and highest is the king. ![]() The values 0-12 represent clubs, 13-25 diamonds, ![]() Here is the full code thus far: public class Cardmain
0 Comments
Leave a Reply. |