I have created War, the classic card game. The game runs, however, it has flaws. For example, it does not have logic on keeping track of cards used already; because of this, it is possible to draw the same cards multiple times in a game but this is of no big issue to me. My main issue though is that I have sooo many variables and unnecessarily large amount of code, so much that it actually doesn't let me post it here because it's 15000 too many characters than allocated. I would like to condense this SIGNIFICANTLY and IMPROVE big time but I need help doing so. Here's what I need; The virtual decks for each player will be single dimensional integer arrays. Cards will be represented as such: imagine a brand new deck where the cards are in order A-K, in sequence hearts, diamonds, clubs, spades. Cards are numbered starting with 0 and ending with 51. Ex. 0 represents the Ace of Hearts, 27 represents the 2 of Clubs, 51 represents the king of Spades, ect. The key to remember is that there are 4 sets of 13 cards in a 52 card deck and Modulus division is to be used obviously, nothing crazy. What's the simplest somebody can make this? If anyone would like to see my ridiculously long code i can email it if they so please.
↧