public Piece resolveAttack(FriendlyPiece defender, FriendlyPiece attacker) {
        Piece winner;
        //check if defender is a bomb
        if (defender.getRank() == Rank.BOMB) {
            if (attacker.getRank() == Rank.MINER) {
                winner = attacker;
            } else { 
                winner = defender;
            }
            //check if spy attacks marshal
        } else if (attacker.getRank() == Rank.SPY
                && defender.getRank() == Rank.MARSHAL) {
            winner = attacker;
            
            //check if flag was captured
        } else if (defender.getRank() == Rank.FLAG) {
            winner = attacker;
         
            //check for a tie
        } else {
            if (defender.getValue() == attacker.getValue()) {
                winner = null;
            } else {
                winner = (defender.getValue() > attacker.getValue())? defender: attacker;
            }
        }
        return winner;
    }