Thanks for the comment, the cards you get in reward after winning a combat are totally random. And in combat the cards are given randomly too, I just tried to make some kind of discard pile and draw pile, in most of the time it's working and you can get the same kind in the row (except duplicate cards). But the code is far of being perfect and sometimes you get the same card after ending the turn.
Why not working on something in the future, since I started I work by myself