My code:
public enum Rank{
//1.1 enum y filename
ACE(1, "resources/e1.png"),TWO(2, "resources/e2.png"),THREE(3, "resources/e3.png"),
FOUR(4, "resources/e4.png"),FIVE(5, "resources/e5.png"),SIX(6, "resources/e6.png"),
SEVEN(7, "resources/e7.png"),EIGHT(8, "resources/e8.png"), NINE(9, "resources/e9.png"),
TEN(10, "resources/e10.png"), JACK(11, "resources/e11.png"),QUEEN(12, "resources/e12.png"),
KING(13, "resources/e13.png");
private final int rankValue;
private final type? imageFile;
//1.2 constructor
private Rango(int rankValue, type? imageFile){
this.rankValue= rankValue;
this.imageFile= imageFile;
}
How can I get images be read in a method? What assigned type can read those image filepaths? Any advice please? Thanks.
Edit: is it possible to use Strings instead i.e. String imageFile and then use that type I'm missing to set it read the String filename?