You could use a Dictionary to map the texture to a value. I have not tried it myself, but something like this may work, at least in theory:
var texture_to_value = {
preload(“King_Hearts.png”):13
preload(“Queen_Hearts.png”):12
preload(“Jack_Hearts.png”):11
preload(“Ten_Hearts.png”):10
# and so on
}