Error Message:
Exception in thread \"main\" java.lang.NumberFormatException: For input string: \"Ace of Clubs\"
at java.lang.NumberFormatException.forInputString
java.lang.NumberFormatException
occurs when you are trying to parse some input which not a Number string.
In your case your trying to parse a string (which not has number )as Integer. As its not possible NumberFormatException exception occured.
int first_value = Integer.parseInt(cards[index]);//cards[index] value should be //number string "123" not "abc"