I have the class ModelPlayer
, the int fields mainAction
and quickAction
and the method quickAction()
, in the method basically I set the quickAction value and from that it executes one of 4 methods. But I get the warning that I'm not using quickAction
and I wanted to know why, because one of the 4 methods can only be executed once I set the value of quickAction
, so I don't understand why it says that I'm not using it.
(NOTE: the methods
setQuickAction()
andgetQuickAction()
shown in the method belong to the classPlayer
, so they're not related)
public class ModelPlayer {
private int mainAction;
private int quickAction;
public void quickAction(Player player,int quickAction){
this.quickAction=quickAction;
if (player.getQuickAction()>0){
switch(quickAction){
case '1':
engageAssistant(player);
player.setQuickAction(0);
case '2':
changeBusinessPermitTile(player);
player.setQuickAction(0);
case '3':
electCouncillorWithAssistant(player);
player.setQuickAction(0);
case '4':
mainAction(player,mainAction);
player.setQuickAction(0);
}
}
}
}