The five cards are uniquely identified by their numbers (low to high). There are $5!=120$ possible orderings for the five cards, which is more than enough to encode the number on the sixth card. In fact, by orienting the cards carefully, there are 4 ways to orient each card and still make a pile (180 degree rotation, turn upside down), there could be $4^55!=122880$ possibilities. I'd only try this variation with a lot of practice, though.