How to add the values of two “Cards” in Java?
I am working on a project to simulate the first deal in a game of blackjack. So far, the program creates two cards of random rank (ACE to KING) and random suit. I am struggling with created a switch table or if-else ladder assign the added value of the two cards as a variable score. The code below represents conceptually what I am trying to do, I just want to know how to make it simpler. Thanks! public int Score() { int score = 0; if (card1.rank() == TWO && card2.rank() == TWO){ score = 4; } else if (card1.rank() == THREE && card2.rank() == TWO){ score = 5; } else if (card1.rank() == FOUR &&