Question: HumanPlayer.java Update class to add the following member variables Game game Add a setter for member variable of class Game Update method makeTrump() so it
| HumanPlayer.java | Update class to add the following member variables Game game Add a setter for member variable of class Game Update method makeTrump() so it does the followingChecks if the max number of passes has been reached (i.e. 3) by calling method getTrumpCheck from class GameIf true, display a message dialog to the player (i.e. the dealer) that they have to accept trump Call method setAcceptTrump passing as an argument the value true ElseCreate a local variable set equal to JOptionPane.showConfirmDialog static method call prompting the human player if they accept the trump suit If the human players response is true,Call method setAcceptTrump() passing as an argument the value true ElseCall method setAcceptTrump() passing as an argument the value false |
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package core;
import constants.Constants.Face; import constants.Constants.Suit; import userinterface.HumanPlayerUi;
/** * * @author */ public class HumanPlayer extends Player {
public Object getHand;
@Override public Card playCard() { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. }
@Override public void makeTrump() { }
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
