Removed: PickOptionalTribeCard and PickOptionalBuildingCard in Game and GameController

This commit is contained in:
rubenpirreram
2026-05-17 16:32:42 +02:00
parent d9ef7983f8
commit 4b4614d17e
8 changed files with 90 additions and 205 deletions
@@ -142,54 +142,14 @@ public class GameController {
* @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 SkipNoDrawable(String playerUsername) {
public boolean SkipTurn(String playerUsername) {
Player player= model.getPlayerByUsername(playerUsername);
if(player==null)
return false;
return model.SkipNoDrawable(model.getPlayerByUsername(playerUsername));
return model.SkipTurn(model.getPlayerByUsername(playerUsername));
}
/**
* Attempts to pick an optional tribe card for the specified player from the specified position.
*
* @param playerUsername the username of the player performing the action.
* @param pos the position of the optional tribe card to pick.
* @return {@code true} if the action succeeds, {@code false} if the player does not exist
* or if the pick operation fails.
*/
public boolean pickOptionalTribeCard(String playerUsername,int pos) {
Player player= model.getPlayerByUsername(playerUsername);
if(player==null)
return false;
return model.PickOptionalTribeCardByIndex(model.getPlayerByUsername(playerUsername), pos);
}
/**
* Attempts to pick an optional building card for the specified player from the specified position.
*
* @param playerUsername the username of the player performing the action.
* @param pos the position of the optional building card to pick.
* @return {@code true} if the action succeeds, {@code false} if the player does not exist
* or if the pick operation fails.
*/
public boolean pickOptionalBuildingCard(String playerUsername,int pos) {
Player player= model.getPlayerByUsername(playerUsername);
if(player==null)
return false;
return model.PickOptionalBuildingCard(model.getPlayerByUsername(playerUsername), pos);
}
/**
* Refuse to pick an optional building card for the specified player.
* @param playerUsername the username of the player performing the action.
* @return {@code true} if the action succeeds, {@code false} if the player does not exist
* or if the pick operation fails.
*/
public boolean noOptionalCard(String playerUsername) {
Player player= model.getPlayerByUsername(playerUsername);
if(player==null)
return false;
return model.NoOptionalCard(model.getPlayerByUsername(playerUsername));
}
/**
* Attempts to perform the slot choice action for the specified player at the specified position.