Fix: only one skipAction(Del:SkipLower/SkipUpper)
This commit is contained in:
@@ -145,16 +145,16 @@ public class ClientController {
|
||||
|
||||
|
||||
/**
|
||||
* Requests to skip drawing from the upper list.
|
||||
* This action is available only when the upper list is empty or the player cannot draw any card.
|
||||
* Requests to skip turn .
|
||||
* This action is available only when the player cannot draw any tribe card.
|
||||
* @param playerUsername the name of the player performing the action
|
||||
*/
|
||||
public void skipUpper(String playerUsername) {
|
||||
public void skipTurn(String playerUsername) {
|
||||
if(!Objects.equals(playerUsername, localController.getModel().getCurrentState().getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.skipUpper(playerUsername);
|
||||
client.skipTurn(playerUsername);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@@ -162,22 +162,6 @@ public class ClientController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Requests to skip drawing from the lower list.
|
||||
* This action is available only when the lower list is empty or the player cannot draw any card.
|
||||
* @param playerUsername the name of the player performing the action
|
||||
*/
|
||||
public void skipLower(String playerUsername) {
|
||||
if(!Objects.equals(playerUsername, localController.getModel().getCurrentState().getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.skipLower(playerUsername);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user