public String war()
	{	
		if (getCompHandSize() >= 2 && getPlayerHandSize() >= 2) //if both hands have at least 2 cards
		{
			for (int i = 0; i < 2; i++) //repeat this procedure twice
			{	
				//System.out.println("Player Hand Size: " + getPlayerHandSize()); //displays hand sizes before war
				//System.out.println("Computer Hand Size: " + getCompHandSize());
				
				compWarCards.add(playCompCard()); //adds a comp card to the compWarCards array
				playerWarCards.add(playPlayerCard()); //adds a player card to playerWarCards array
				
				//System.out.println("compWarCardsArray size: " + compWarCards.size()); //for first war, should be 2 for both
				//System.out.println("playerWarCardsArray size: " + playerWarCards.size());
	
			}
			
			setPlayerWarInitiator(); //gets copy of the reference to the last variable in the array and stores it in a new card
			setCompWarInitiator();
					
			//System.out.println("\ncompWarCardsArray size: " + compWarCards.size()); //should be same as above
			//System.out.println("playerWarCardsArray size: " + playerWarCards.size());
			
			if (compWarInitiator.getRank() > playerWarInitiator.getRank())
			{						
				warWinner = "computer";
				
				while (!playerWarCards.isEmpty()) //while there are still cards to remove from the player's temporary array
				{
					addCompCard(playerWarCards.remove(0)); //remove the cards from both arrays and add the cards
					addCompCard(compWarCards.remove(0));   //to the computer's hand
				}
				//System.out.println(compWarCards.size() + playerWarCards.size());
			}
			
			else if (compWarInitiator.getRank() < playerWarInitiator.getRank())
			{
				warWinner = "player";
				
				while (!playerWarCards.isEmpty()) //while there are still cards to remove from the player's temporary array
				{
					addPlayerCard(playerWarCards.remove(0)); //remove the cards from both arrays and add the cards
					addPlayerCard(compWarCards.remove(0));   //to the computer's hand
				}
					//System.out.println(compWarCards.size() + playerWarCards.size());
	
			}
			
			else
				warWinner = "tie";
				
				//setCompWarInitiator(getLastCompWarCard());  //set those cards to be the initiators of the war next war (for GUI display purposes)
				//setPlayerWarInitiator(getLastPlayerWarCard());
		}
		
		else //if one of the hands doesn't have 2 cards
		{
			if (getCompHandSize() < 2)
				warWinner = "computerloses";
			else
				warWinner = "playerloses";
		}
			
			
		return warWinner;
		
	}