You will then use a while loop and an if statement for both two pairs and two of a kind. After a flush you will use a while loop and two if statements for both straights and three of a kind. After a full house is the flush where you will use a while loop and an if statement. You will use a single if statement to determine a full house. Next will be four of a kind, and you will use a while loop and three if statements to determine if they have four of a kind. After the royal flush you will use two while loops and three if statements to determine if the player has a straight flush. Using the for loop you will determine if all the cards have the same suit, and then using the two if statements you will determine if the cards are a ten, Jack, Queen, King, and an ace. Use a for loop and two if statements to determine if the player has a royal flush or not. You will want to start with the royal flush. The third step is to use for loops, if statements, and while loops to tell the player what combination they have. You are now ready for the third step of the process to create a game of poker in Java.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |