The red cards are attack cards, the blue are defense cards. Each card has a number on it, That number is the amount of points that card will deal. If you use a defense card, that number will be added to your defense total. If you are attacked, your defense will lower according to the damage dealt. Any remaining defense points will be added to your health. Same goes with the computer you are facing.
My first attempt at a basic card game.