mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-04-12 04:21:08 +02:00
Compare commits
7 Commits
b819e1ca9b
...
93386fa77a
Author | SHA1 | Date | |
---|---|---|---|
|
93386fa77a | ||
|
6cdf0eee53 | ||
|
b6803c562c | ||
|
38699ac07a | ||
|
f396ef52f2 | ||
|
73bf147817 | ||
|
80f9054add |
@ -101,6 +101,13 @@ selector("label-Text", "pp") {
|
||||
color = buttonEnabledColor
|
||||
}
|
||||
|
||||
selector("label-player", "pp") {
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
font = font("Interface/Fonts/Metropolis/Metropolis-Bold-32.fnt")
|
||||
fontSize = 20
|
||||
color = buttonEnabledColor
|
||||
}
|
||||
|
||||
selector("label-account", "pp") {
|
||||
insets = new Insets3f(2, 2, 2, 2)
|
||||
fontSize = 25
|
||||
|
@ -15,6 +15,9 @@ import java.lang.System.Logger.Level;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.logging.LogManager;
|
||||
import java.awt.Image;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import com.jme3.app.DebugKeysAppState;
|
||||
import com.jme3.app.SimpleApplication;
|
||||
@ -169,6 +172,12 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
||||
private AppSettings makeSettings() {
|
||||
final AppSettings settings = new AppSettings(true);
|
||||
settings.setTitle(lookup("monopoly.name"));
|
||||
try {
|
||||
settings.setIcons(new Image[]{ImageIO.read(new File("src/main/resources/icons/Uniman.png"))});
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOGGER.log(Level.ERROR, e.getMessage());
|
||||
}
|
||||
settings.setResolution(config.getResolutionWidth(), config.getResolutionHeight());
|
||||
settings.setFullscreen(config.fullScreen());
|
||||
settings.setUseRetinaFrameBuffer(config.useRetinaFrameBuffer());
|
||||
|
@ -510,7 +510,8 @@ public class Toolbar extends Dialog implements GameEventListener {
|
||||
if (player.getId() != app.getId()) {
|
||||
Label playerLabel = new Label(
|
||||
player.getName() + ": " + player.getAccountBalance() + " EUR",
|
||||
new ElementId("label-Text")
|
||||
new ElementId("label-player")
|
||||
|
||||
);
|
||||
playerLabel.setColor(Player.getColor(player.getId()).getColor());
|
||||
overviewContainer.addChild(playerLabel);
|
||||
|
@ -77,7 +77,7 @@ public class BuyHouse extends Dialog {
|
||||
backgroundContainer.setPreferredSize(buyHouseContainer.getPreferredSize().addLocal(padding, padding, 0));
|
||||
|
||||
// Title
|
||||
Label title = buyHouseContainer.addChild(new Label("Gebäude Kaufen", new ElementId("warning-Bold")));
|
||||
Label title = buyHouseContainer.addChild(new Label("Gebäude Kaufen", new ElementId("label-Bold")));
|
||||
title.setFontSize(48);
|
||||
title.setColor(ColorRGBA.Black);
|
||||
|
||||
@ -145,7 +145,7 @@ public class BuyHouse extends Dialog {
|
||||
private Container createPropertyDropdown() {
|
||||
Container dropdownContainer = new Container(new SpringGridLayout(Axis.Y, Axis.X));
|
||||
dropdownContainer.setPreferredSize(new Vector3f(300, 200, 0));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Orange));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f)));
|
||||
|
||||
VersionedList<String> propertyOptions = new VersionedList<>();
|
||||
List<BuildingProperty> playerProperties = getPlayerProperties();
|
||||
@ -164,6 +164,7 @@ public class BuyHouse extends Dialog {
|
||||
// Initialize the selection display here
|
||||
selectionDisplay = new Label("");
|
||||
selectionDisplay.setPreferredSize(new Vector3f(300, 30, 0));
|
||||
selectionDisplay.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
dropdownContainer.addChild(selectionDisplay); // Add it to the dropdown container
|
||||
|
||||
// Set initial selection
|
||||
|
@ -82,7 +82,7 @@ public class RepayMortage extends Dialog {
|
||||
backgroundContainer.setPreferredSize(repayMortageContainer.getPreferredSize().addLocal(padding, padding, 0));
|
||||
|
||||
// Titel
|
||||
Label title = repayMortageContainer.addChild(new Label( "Hypothek Abbezahlen", new ElementId("warining-Bold")));
|
||||
Label title = repayMortageContainer.addChild(new Label( "Hypothek Abbezahlen", new ElementId("label-Bold")));
|
||||
title.setFontSize(48);
|
||||
title.setColor(ColorRGBA.Black);
|
||||
|
||||
@ -97,7 +97,7 @@ public class RepayMortage extends Dialog {
|
||||
upContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
|
||||
middleContainer.setPreferredSize(new Vector3f(100, 150, 0));
|
||||
middleContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Orange));
|
||||
middleContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f)));
|
||||
|
||||
middleContainer.addChild(createPropertyDropdown());
|
||||
|
||||
@ -149,7 +149,7 @@ public class RepayMortage extends Dialog {
|
||||
private Container createPropertyDropdown() {
|
||||
Container dropdownContainer = new Container(new SpringGridLayout(Axis.Y, Axis.X));
|
||||
dropdownContainer.setPreferredSize(new Vector3f(300, 200, 0));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Orange));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f)));
|
||||
|
||||
VersionedList<String> propertyOptions = new VersionedList<>();
|
||||
List<PropertyField> playerProperties = getPlayerProperties();
|
||||
@ -168,6 +168,7 @@ public class RepayMortage extends Dialog {
|
||||
// Initialize the selection display here
|
||||
selectionDisplay = new Label(""); // Create TextField for displaying selections
|
||||
selectionDisplay.setPreferredSize(new Vector3f(300, 30, 0));
|
||||
selectionDisplay.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
dropdownContainer.addChild(selectionDisplay); // Add it to the dropdown container
|
||||
|
||||
// Set initial selection
|
||||
|
@ -82,7 +82,7 @@ public class SellHouse extends Dialog {
|
||||
backgroundContainer.setPreferredSize(sellhouseContainer.getPreferredSize().addLocal(padding, padding, 0));
|
||||
|
||||
// Titel
|
||||
Label title = sellhouseContainer.addChild(new Label( "Gebäude Abreißen", new ElementId("warining-Bold")));
|
||||
Label title = sellhouseContainer.addChild(new Label( "Gebäude Abreißen", new ElementId("label-Bold")));
|
||||
title.setFontSize(48);
|
||||
title.setColor(ColorRGBA.Black);
|
||||
|
||||
@ -155,7 +155,7 @@ public class SellHouse extends Dialog {
|
||||
private Container createPropertyDropdown() {
|
||||
Container dropdownContainer = new Container(new SpringGridLayout(Axis.Y, Axis.X));
|
||||
dropdownContainer.setPreferredSize(new Vector3f(300, 200, 0));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Orange));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f)));
|
||||
|
||||
VersionedList<String> propertyOptions = new VersionedList<>();
|
||||
List<BuildingProperty> playerProperties = getPlayerProperties();
|
||||
@ -174,6 +174,7 @@ public class SellHouse extends Dialog {
|
||||
// Initialize the selection display here
|
||||
selectionDisplay = new Label("");
|
||||
selectionDisplay.setPreferredSize(new Vector3f(300, 30, 0));
|
||||
selectionDisplay.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
dropdownContainer.addChild(selectionDisplay); // Add it to the dropdown container
|
||||
|
||||
// Set initial selection
|
||||
|
@ -83,7 +83,7 @@ public class TakeMortage extends Dialog {
|
||||
backgroundContainer.setPreferredSize(takeMortageContainer.getPreferredSize().addLocal(padding, padding, 0));
|
||||
|
||||
// Titel
|
||||
Label title = takeMortageContainer.addChild(new Label( "Hypothek aufnehmen", new ElementId("warining-Bold")));
|
||||
Label title = takeMortageContainer.addChild(new Label( "Hypothek aufnehmen", new ElementId("label-Bold")));
|
||||
title.setFontSize(48);
|
||||
title.setColor(ColorRGBA.Black);
|
||||
|
||||
@ -150,7 +150,7 @@ public class TakeMortage extends Dialog {
|
||||
private Container createPropertyDropdown() {
|
||||
Container dropdownContainer = new Container(new SpringGridLayout(Axis.Y, Axis.X));
|
||||
dropdownContainer.setPreferredSize(new Vector3f(300, 200, 0));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(ColorRGBA.Orange));
|
||||
dropdownContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f)));
|
||||
|
||||
VersionedList<String> propertyOptions = new VersionedList<>();
|
||||
List<PropertyField> playerProperties = getPlayerProperties();
|
||||
@ -174,6 +174,7 @@ public class TakeMortage extends Dialog {
|
||||
// Initialize the selection display here
|
||||
selectionDisplay = new Label(""); // Create TextField for displaying selections
|
||||
selectionDisplay.setPreferredSize(new Vector3f(300, 30, 0));
|
||||
selectionDisplay.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
dropdownContainer.addChild(selectionDisplay); // Add it to the dropdown container
|
||||
|
||||
// Set initial selection
|
||||
|
BIN
Projekte/monopoly/client/src/main/resources/icons/Uniman.png
Normal file
BIN
Projekte/monopoly/client/src/main/resources/icons/Uniman.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 364 KiB |
Binary file not shown.
Before Width: | Height: | Size: 31 KiB |
@ -310,6 +310,8 @@ public class ClientGameLogic implements ServerInterpreter, GameEventBroker {
|
||||
} else if(msg.getKeyWord().equals("ReceivedRent")) {
|
||||
playSound(Sound.MONEY_COLLECTED);
|
||||
notifyListeners(new PopUpEvent("ReceivedRent", msg));
|
||||
} else if (msg.getKeyWord().equals("aussetzen")) {
|
||||
notifyListeners(new ButtonStatusEvent(false));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class ServerGameLogic implements ClientInterpreter {
|
||||
* @param player the Player to whom the message is sent
|
||||
* @param msg the ServerMessage to send
|
||||
*/
|
||||
void send(Player player, ServerMessage msg) {
|
||||
public void send(Player player, ServerMessage msg) {
|
||||
if (player != null && msg != null) {
|
||||
serverSender.send(player.getId(), msg);
|
||||
LOGGER.log(Level.DEBUG, "Message sent to player {0}: {1}", player.getName(), msg.getClass().getSimpleName());
|
||||
|
@ -8,6 +8,7 @@ import java.util.Queue;
|
||||
|
||||
import pp.monopoly.game.server.Player;
|
||||
import pp.monopoly.message.client.EndTurn;
|
||||
import pp.monopoly.message.server.NotificationMessage;
|
||||
|
||||
public class DeckHelper{
|
||||
|
||||
@ -258,6 +259,7 @@ public class DeckHelper{
|
||||
|
||||
private void rueckstuferantrag(Player player) {
|
||||
player.getHandler().getLogic().received(new EndTurn(), player.getId());
|
||||
player.getHandler().getLogic().send(player, new NotificationMessage("aussetzen"));
|
||||
}
|
||||
|
||||
private void hausfeierSturz(Player player) {
|
||||
|
Loading…
Reference in New Issue
Block a user