Development #37
@@ -1,16 +1,8 @@
|
|||||||
package pp.mdga.client;
|
package pp.mdga.client;
|
||||||
|
|
||||||
import pp.mdga.client.acoustic.MdgaSound;
|
|
||||||
import pp.mdga.client.server.MdgaServer;
|
|
||||||
import pp.mdga.client.view.CeremonyView;
|
|
||||||
import pp.mdga.client.view.GameView;
|
import pp.mdga.client.view.GameView;
|
||||||
import pp.mdga.client.view.LobbyView;
|
|
||||||
import pp.mdga.game.BonusCard;
|
import pp.mdga.game.BonusCard;
|
||||||
import pp.mdga.game.Color;
|
import pp.mdga.game.Color;
|
||||||
import pp.mdga.message.client.LobbyReadyMessage;
|
|
||||||
import pp.mdga.notification.AcquireCardNotification;
|
|
||||||
import pp.mdga.notification.DrawCardNotification;
|
|
||||||
import pp.mdga.notification.TskSelectNotification;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
@@ -75,10 +67,10 @@ public void selectCard(BonusCard card) {
|
|||||||
|
|
||||||
GameView gameView = (GameView) app.getView();
|
GameView gameView = (GameView) app.getView();
|
||||||
|
|
||||||
if(card == null) {
|
if(card != null) {
|
||||||
gameView.needConfirm();
|
gameView.needConfirm();
|
||||||
} else {
|
} else {
|
||||||
gameView.needNoPower();
|
gameView.showNoPower();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,17 +86,13 @@ public void confirm() {
|
|||||||
} else if (a != null) {
|
} else if (a != null) {
|
||||||
app.getGameLogic().selectPiece(a);
|
app.getGameLogic().selectPiece(a);
|
||||||
gameView.getBoardHandler().clearSelectable();
|
gameView.getBoardHandler().clearSelectable();
|
||||||
} else {
|
|
||||||
if(null == card) {
|
|
||||||
app.getGameLogic().selectCard(null);
|
|
||||||
} else {
|
} else {
|
||||||
app.getGameLogic().selectCard(card);
|
app.getGameLogic().selectCard(card);
|
||||||
gameView.getGuiHandler().clearSelectableCards();
|
gameView.getGuiHandler().clearSelectableCards();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
gameView.noConfirm();
|
gameView.noConfirm();
|
||||||
gameView.noNoPower();
|
gameView.hideNoPower();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void selectTsk(Color color) {
|
public void selectTsk(Color color) {
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ private void handleGame(Notification notification) {
|
|||||||
}
|
}
|
||||||
} else if (notification instanceof SelectableCardsNotification n) {
|
} else if (notification instanceof SelectableCardsNotification n) {
|
||||||
guiHandler.setSelectableCards(n.getCards());
|
guiHandler.setSelectableCards(n.getCards());
|
||||||
gameView.needNoPower();
|
gameView.showNoPower();
|
||||||
} else if (notification instanceof ShieldActiveNotification n) {
|
} else if (notification instanceof ShieldActiveNotification n) {
|
||||||
boardHandler.shieldPiece(n.getPieceId());
|
boardHandler.shieldPiece(n.getPieceId());
|
||||||
} else if (notification instanceof ShieldSuppressedNotification n) {
|
} else if (notification instanceof ShieldSuppressedNotification n) {
|
||||||
|
|||||||
@@ -122,13 +122,13 @@ public void noConfirm() {
|
|||||||
confirmButton.hide();
|
confirmButton.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void needNoPower() {
|
public void showNoPower() {
|
||||||
confirmButton.hide();
|
confirmButton.hide();
|
||||||
noPowerButton.show();
|
noPowerButton.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void noNoPower() {
|
public void hideNoPower() {
|
||||||
noPowerButton.show();
|
noPowerButton.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enterInterrupt(Color color) {
|
public void enterInterrupt(Color color) {
|
||||||
|
|||||||
Reference in New Issue
Block a user