![]() Catches the Array 0 error and prints out who is the winner based on who has zero cards.Ĭatch (IndexOutOfBoundsException theException) //tries to catch this type. You may want to use user input to implement a delay between each round.įinal static String suits = while(player1Pile.size() > 0 || player2Pile.size() > 0) ![]() You should print the cards that each player isĭealt and the result of that round and the final result of the game. There is no input required from the players (not very interesting!). ![]() The player that wins the most rounds wins the game. If the cards that are dealt have the same value, then it is a tie and neither player wins. Whoever has the card with the highest value wins. In this game, each player is dealt a card from the full deck. ![]() This is a class assignment, I am not asking for anyone to DO the assignment for me but rather I have attempted to my best ability before posting on here in hopes of receiving some help on my 4 errors I am receiving and that my deck is not being shuffled for some reason.įor this assignment, you will create a program that plays a simple game of War. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |