I thought about something similar like that but there are some problems:
The cards you get are always different, some high mana cards are much better then others(e.g.: twising nether vs ragnaros). Another problem is, the bot doesn't know what it's playing against. Maybe it's best to pick an armor smith(cost 2 mana) vs pirate warrior to get more health or a removal spell to kill that frothing etc.
For counting turns you can use some existing stuff like p.turnCounter or p.ownMaxMana. Would be nice if you can pm me your code