Fix: only one skipAction(Del:SkipLower/SkipUpper)
This commit is contained in:
@@ -119,32 +119,19 @@ public class GameController {
|
||||
return model.DrawLowerBuildingCardByIndex(model.getPlayerByUsername(playerUsername), pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips the upper card drawing action for the specified player.
|
||||
*
|
||||
* @param playerUsername the username of the player who wants to skip the upper drawing action.
|
||||
* @return {@code true} if the skip action is valid and successfully performed;
|
||||
* {@code false} if the player does not exist or the action is not valid.
|
||||
*/
|
||||
public boolean SkipUpperDrawing(String playerUsername) {
|
||||
Player player= model.getPlayerByUsername(playerUsername);
|
||||
if(player==null)
|
||||
return false;
|
||||
return model.SkipUpperDrawing(model.getPlayerByUsername(playerUsername));
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips the lower card drawing action for the specified player.
|
||||
* Skips the card drawing action for the specified player.
|
||||
*
|
||||
* @param playerUsername the username of the player who wants to skip the lower drawing action.
|
||||
* @param playerUsername the username of the player who wants to skip the turn action.
|
||||
* @return {@code true} if the skip action is valid and successfully performed;
|
||||
* {@code false} if the player does not exist or the action is not valid.
|
||||
*/
|
||||
public boolean SkipLowerDrawing(String playerUsername) {
|
||||
public boolean SkipNoDrawable(String playerUsername) {
|
||||
Player player= model.getPlayerByUsername(playerUsername);
|
||||
if(player==null)
|
||||
return false;
|
||||
return model.SkipLowerDrawing(model.getPlayerByUsername(playerUsername));
|
||||
return model.SkipNoDrawable(model.getPlayerByUsername(playerUsername));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user