Thanks! I'm glad you liked it!
As for the CPU, it doesn't actually choose a card. At the start of each round, the deck is shuffled and split between the player and the opponent. So the opponent simply draws and plays the top card from it's deck.