[Solved] COP3330 Object Oriented Programming Euchre Project Part 6

$25

File Name: COP3330_Object_Oriented_Programming_Euchre_Project_Part_6.zip
File Size: 536.94 KB

SKU: [Solved] COP3330 Object Oriented Programming Euchre Project Part 6 Category: Tag:
5/5 - (1 vote)

Assignment Scope

For this assignment each player will either accept or reject the trump suit. If the player accepts the trump suit they say Pick it up! If the player rejects the trump suit they say Pass. The human player will be able to respond as desired. For the AI players it will depend upon how many cards in their hand match the trump suit. For our purposes we will implement the version of Euchre called Stick the Dealer. What that means is, if every player passes on the trump suit the dealer has to accept it!

To accomplish this:

  1. Reference the tasks below for the specifics of the source code requirements.
  2. Compress a project and submit to Webcourses
  3. Decompress compressed project and verify it is a Netbeans project

References

  1. docx
  2. Setting up a project in Netbeans.docx
  3. Netbeans right click menu help.docx

Deliverables

To complete this assignment, you must submit your compressed Netbeans project to Webcourses.

Please keep in mind that the tasks are guidance to accomplish the goals of the assignment. At times students will be required to do additional research (e.g. Google That S**T (GTS)!) to find implementation options. In the industry, software engineers are expected to be very self-sufficient to find the best solution for the task at hand.

I have provided multiple code examples on Webcourses that shows how to implement numerous of the tasks below, please reference those code examples prior to asking me for help!

Tasks and Rubric

Activity
euchre package
constants package
Constants.java 1. Update class to add the following constanta. MAX_PASSES = 3b. MIN_TRUMP = 3
core package
AiPlayer.java 1. Update class to add the following member variablesa. Game game2. Add a setter for member variable of class Game3. Update method makeTrump() so it does the followinga. Checks if the max number of passes has been reached (i.e. 3) by calling method getTrumpCheck from class Gamei. If true, display a message dialog to the player (i.e. the dealer) that they have to accept trumpii. Call method setAcceptTrump passing as an argument the value trueb. Elsei. Create a local variable to count how many cards the player has of the trump suitii. Loop through the players hand, for each card in their hand1. Check if the current cards suit matches the trump cards suit2. HINT: reference member variable of class Game calling method getTrump to retrieve the trump cardiii. Check if the trump counter is greater than or equal the value of 3 (e.g. this is a good indicator the team will win the hand)1. If true, call method setAcceptTrump() passing as an argument the value true2. Display a message dialog stating that the current player has said Pick it Up!iv. Else1. Call method setAcceptTrump() passing as an argument the value false2. Display a message dialog stating that the current player has said Pass!
Game.java 1. Update class to add the following member variablesa. int trumpCheckb. Team trumpTeam
2. Add a getter for member variable trumpCheck3. Update customer constructor Game() to do the followinga. Comment out the call the method play()4. Update method createTeams() to do the followinga. On the instance of class HumanPlayer, call method setGame() passing as an argument a reference to this class Gameb. On the instance of class AiPlayer, call method setGame() passing as an argument a reference to this class Game5. Update method play() to do the followinga. Comment out any current codeb. Add a call to method trumpCheck6. Add method trumpCheck to do the followinga. Return type voidb. Empty parameter listc. Initialize member variable trumpCheck to the value of 0d. Create a local variable of data type int to represent the current player, initialized to the member variable leadIdxe. Loop while the value of member variable trumpCheck is less than the number of playersi. Instantiate an instance of class Player set equal to member variable getting the player at the position represented by local variable created in step d. (i.e. starting with the lead player)ii. On the Player object from above, call method makeTrump()iii. Check if the Player object accepted the trump by calling method getAcceptTrump()1. If true, loop through the member variable of data type ArrayList that stores the teams in the game2. Check if the current team contains the current player (HINT: use method contains() that is part of the class ArrayList)a. If true, set the member variable trumpTeam equal to the current teamb. Display a dialog message to state which team has accepted the trump suit3. Break out of the while loop if trump has been acceptediv. Else1. Increment the member variable trumpCheck by onev. Increment the local variable representing the current player by one; be sure to check if the counter is equal to 3, then reset it to 0 (e.g. remember, the table member variable has only 4 elements so the maximum index is 3)
HumanPlayer.java 1. Update class to add the following member variablesa. Game game2. Add a setter for member variable of class Game3. Update method makeTrump() so it does the followinga. Checks if the max number of passes has been reached (i.e. 3) by calling method getTrumpCheck from class Gamei. If true, display a message dialog to the player (i.e. the dealer) that they have to accept trumpii. Call method setAcceptTrump passing as an argument the value trueb. Elsei. Create a local variable set equal to JOptionPane.showConfirmDialog static method call prompting the human player if they accept the trump suitii. If the human players response is true,1. Call method setAcceptTrump() passing as an argument the value trueiii. Else1. Call method setAcceptTrump() passing as an argument the value false
Player.java 1. Update class to add the following member variablea. boolean acceptTrump2. Generate a getter/setter for the member variable acceptTrump
images package
userInterface package
AiPlayerUi.java 1. Update the class to add the following member variablesa. GameUi gameUi2. Modify the custom constructor to do the followinga. Add a third parameter of data type class GameUib. On the member variable of class AiPlayer, call method setUi passing as an argument the parameter of class GameUi
GameUi.java 1. Update the class to add the following member variablesa. JPanel trumpPanel (if you added bidPanel in the last assignment, please rename it)b. JLabel teamOneScoreLblc. JLabel teamOneScored. JLabel teamTwoScoreLble. JLabel teamTwoScoref. JLabel trumpCard
2. Update initComponents to do the followinga. Trump Panel1. Instantiate the JPanel member variable for the trump panel2. Instantiate the JLabel member variable for the trump label3. Instantiate an instance of class CardUi passing as arguments to the constructor the followingi. JLabel member variable for the trump cardii. The trump cards face valueiii. The trump cards suitiv. Update the JLabel member variable for the trump to do the followinga. setting it equal to method call getLabel on the instance of class CardUib. add client property passing arguments face and the trump cards face valuec. add client property passing arguments suit and the trump cards suitv. Add the trump card JLabel the the trump panel4. Add the trump JPanel to the north JPanelb. Score Panel1. Use layout manager GridLayout so it is a 2 x 2 grid2. Instantiate the following member variables of class JLabeli. teamOneScoreLbl with text Team Oneii. teamOneScore with text using the following method call: game.getTeams().get(Constants.ONE).getTeamScore()iii. teamOneScoreLbl with text Team Twoiv. teamOneScore with text using the following method call: game.getTeams().get(Constants.TWO).getTeamScore()3. Add the four JLabels to the score JPanel4. Add the score JPanel the the north JPanelc. For the four player JPanels, aiOnePanel, aiTwoPanel, aiThreePanel, and hpPanel1. Add an additional argument to the constructor calls a reference to this class, GameUi
HumanPlayerUi.java 1. Update the class to add the following member variablesa. GameUi gameUi2. Modify the custom constructor to do the followinga. Add a second parameter of data type class GameUi1. On the member variable of class HumanPlayer, call method setUi passing as an argument the parameter of class GameUi
Euchre application
Test Cases Test Cases pass
Source compiles with no errors
Source runs with no errors
Source includes comments
Total

Perform the following test cases

Test Cases
Action Expected outcome
Test Case 1 Regression Testing: Initial JOptionPane displays JOptionPane is similar to figure 1
Text Case 2 Regression Testing: JOptionPane Prompts User Name JOptionPane is similar to figure 2
Test Case 3 Euchre Initial UI displays Game UI looks similar figure 3 where:1. The score panel displays2. The trump panel displays
Test Case 4 Regression Testing: Project view Project view matches figure 4
Test Cases 5, 6, 7, 8 The result of each player accepting or rejecting the trump suit should display Game UI looks similar to figures 5, 6, 7, and 8
Test Case 9 The team that called trump UI looks similar to figure 9

Figure 1 Intro JOptionPane

Figure 2 Prompt for Users Name

Figure 3 Euchre Initial UI

Figure 4 Project View

Figure 5 Lead Player

Figure 6 Next Player

Figure 7 Next Player

Figure 8 Dealer

Figure 9 Trump Team

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] COP3330 Object Oriented Programming Euchre Project Part 6
$25