logic inplace for war and upto 2 ties, won cards are added to end of array