Implement the method in War.java. You’re welcome (and in fact,encouraged) to add other methods as needed to this class. You canalso add other classes to the src/ directory, though likely youwon’t need to do so.
package simulation;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
/**
*
* A Java class to simulate the card game War. See assignmentwriteup for details.
*
*
*/
public class War {
/**
* Determines the winner of a game of War, returning 1if player A wins, -1 if player B wins, 0 if a draw.
*
* The rules of the game are defined in the assignmentwriteup.
*
* @param deck
* @return 1 if player
OR
OR