I have an array named trick of type Card which stores the Suit and the Rank. Is there a way to use Collections.max to find the highest ranked card? I have used ordinals in other aspects of my code but cant seem to get it to work now.
I have tried this, (t is the parameter passed into the method. trick is the array containing the Cards)
Collections.max(t.trick.rank.ordinal());
Its part of an else if statement which then goes onto another so I don't think I can start it with a for loop and as its part of a inherited class I cant do the for loop else where as it throws errors due to it not being inherited from the other class. Is there a simple way of finding my highest ranked card?