Merge branch 'main' into GUI-2.0
This commit is contained in:
@@ -93,11 +93,7 @@ public class ClientController {
|
||||
}
|
||||
else
|
||||
{
|
||||
try {
|
||||
client.drawUpperTribeCard(playerUsername, pos);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.drawUpperTribeCard(playerUsername, pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,11 +108,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername, miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else
|
||||
try {
|
||||
client.drawLowerTribeCard(playerUsername, pos);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.drawLowerTribeCard(playerUsername, pos);
|
||||
}
|
||||
|
||||
|
||||
@@ -130,11 +122,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername, miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.drawUpperBuildingCard(playerUsername,pos);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.drawUpperBuildingCard(playerUsername,pos);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -150,11 +138,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername,miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.drawLowerBuildingCard(playerUsername,pos);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.drawLowerBuildingCard(playerUsername,pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,11 +152,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername,miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.skipTurn(playerUsername);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.skipTurn(playerUsername);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,11 +169,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername,miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.pickOptionalTribeCard(playerUsername,pos);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.pickOptionalTribeCard(playerUsername,pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,11 +184,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername, miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.pickOptionalBuildingCard(playerUsername,pos);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.pickOptionalBuildingCard(playerUsername,pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,11 +198,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername, miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.noOptionalCard(playerUsername);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.noOptionalCard(playerUsername);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,11 +212,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername, miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.slotChoice(playerUsername,pos);
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.slotChoice(playerUsername,pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,11 +221,7 @@ public class ClientController {
|
||||
if(!Objects.equals(playerUsername, miniModel.currentState.getCurrentPlayer().getUserName()))
|
||||
view.showError("It's not your turn!");
|
||||
else {
|
||||
try {
|
||||
client.totemChoice(playerUsername, String.valueOf(miniModel.availableTotems.get(pos)));
|
||||
} catch (RemoteException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
client.totemChoice(playerUsername, String.valueOf(miniModel.availableTotems.get(pos)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user