Fix: Resolving Git Merge Conflicts #253
@@ -144,7 +144,6 @@ public class Message {
|
|||||||
case "WHISPER":
|
case "WHISPER":
|
||||||
return new Message(
|
return new Message(
|
||||||
ChatType.WHISPER,
|
ChatType.WHISPER,
|
||||||
-1,
|
|
||||||
m.group("user"),
|
m.group("user"),
|
||||||
m.group("target"),
|
m.group("target"),
|
||||||
m.group("time"),
|
m.group("time"),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import ch.unibas.dmi.dbis.cs108.casono.client.game.Card;
|
|||||||
import ch.unibas.dmi.dbis.cs108.casono.client.game.GameState;
|
import ch.unibas.dmi.dbis.cs108.casono.client.game.GameState;
|
||||||
import ch.unibas.dmi.dbis.cs108.casono.client.game.Player;
|
import ch.unibas.dmi.dbis.cs108.casono.client.game.Player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,10 +43,13 @@ public class GameClient {
|
|||||||
* @param input The raw response string from the server.
|
* @param input The raw response string from the server.
|
||||||
* @return A GameState object representing the current state of the game.
|
* @return A GameState object representing the current state of the game.
|
||||||
*/
|
*/
|
||||||
|
private GameState parseGameState(String input) {
|
||||||
private GameState parseGameState(List<String> input) {
|
private GameState parseGameState(List<String> input) {
|
||||||
|
|
||||||
GameState state = new GameState();
|
GameState state = new GameState();
|
||||||
|
|
||||||
|
String[] lines = input.split("\n");
|
||||||
|
|
||||||
Player currentPlayer = null;
|
Player currentPlayer = null;
|
||||||
Card currentCard = null;
|
Card currentCard = null;
|
||||||
|
|
||||||
|
|||||||
@@ -5,37 +5,37 @@
|
|||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.image.*?>
|
<?import javafx.scene.image.*?>
|
||||||
|
|
||||||
<!-- Hauptcontainer: Verknüpft die UI mit dem CasinoGameController und lädt Casinogameui.css -->
|
<!-- Hauptcontainer: Verknüpft die UI mit dem CasinoGameController und lädt casinogameui.css -->
|
||||||
<AnchorPane xmlns="http://javafx.com/javafx/21"
|
<AnchorPane xmlns="http://javafx.com/javafx/21"
|
||||||
xmlns:fx="http://javafx.com/fxml/1"
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameController"
|
fx:controller="ch.unibas.dmi.dbis.cs108.casono.client.ui.gameui.CasinoGameController"
|
||||||
styleClass="background"
|
styleClass="background"
|
||||||
stylesheets="@Casinogameui.css">
|
stylesheets="@casinogameui.css">
|
||||||
|
|
||||||
<GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
|
<GridPane prefWidth="1200" prefHeight="800" AnchorPane.topAnchor="0" AnchorPane.bottomAnchor="0" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<!-- Table-Box: 70% -->
|
<!-- Tisch-Box: 70% -->
|
||||||
<ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" />
|
<ColumnConstraints percentWidth="70.0" hgrow="ALWAYS" />
|
||||||
<!-- Table-Box: 5% -->
|
<!-- Leere-Box: 5% -->
|
||||||
<ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" />
|
<ColumnConstraints percentWidth="5.0" hgrow="ALWAYS" />
|
||||||
<!-- Table-Box: 20% -->
|
<!-- Chat-Box: 20% -->
|
||||||
<ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" />
|
<ColumnConstraints percentWidth="25.0" hgrow="ALWAYS" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
|
|
||||||
<!-- Ensures that this line uses all available vertical space -->
|
<!-- Sorgt dafür, dass diese Zeile den gesamten verfügbaren vertikalen Platz nutzt -->
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints vgrow="ALWAYS" />
|
<RowConstraints vgrow="ALWAYS" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
|
|
||||||
<children>
|
<children>
|
||||||
<!-- Table box in column 0 -->
|
<!-- Tisch-Box in Spalte 0 -->
|
||||||
<StackPane GridPane.columnIndex="0">
|
<StackPane GridPane.columnIndex="0">
|
||||||
<!-- Inner spacing: Keeps the content 10 pixels away from the top/bottom and 20 pixels from the sides -->
|
<!-- Innenabstand: Hält den Inhalt 10 Pixel von oben/unten und 20 Pixel von den Seiten fern -->
|
||||||
<padding>
|
<padding>
|
||||||
<Insets top="20" right="10" bottom="120" left="20"/>
|
<Insets top="20" right="10" bottom="120" left="20"/>
|
||||||
</padding>
|
</padding>
|
||||||
|
|
||||||
<!-- Central Casino Table: Centers the content and utilizes the entire window due to its maximum size (1.7976931348623157E308) -->
|
<!-- Zentraler Casinotisch: Zentriert den Inhalt und nutzt durch die maximale Größe (1.7976931348623157E308) das gesamte Fenster -->
|
||||||
<VBox fx:id="casinoTable"
|
<VBox fx:id="casinoTable"
|
||||||
alignment="CENTER"
|
alignment="CENTER"
|
||||||
styleClass="casino-table"
|
styleClass="casino-table"
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
maxWidth="Infinity"
|
maxWidth="Infinity"
|
||||||
maxHeight="Infinity">
|
maxHeight="Infinity">
|
||||||
|
|
||||||
<!-- TODO: Placeholder for the poker playing area: Cards, chips and opponents' bets will be dynamically displayed here later -->
|
<!-- TODO: Platzhalter für die Poker-Spielfläche: Hier werden später dynamisch Karten, Chips und Einsätze der Gegner angezeigt -->
|
||||||
<HBox alignment="CENTER" spacing="15">
|
<HBox alignment="CENTER" spacing="15">
|
||||||
<VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" />
|
<VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" />
|
||||||
<VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" />
|
<VBox styleClass="dealer-box" prefWidth="80" prefHeight="120" />
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
</HBox>
|
</HBox>
|
||||||
|
|
||||||
<VBox alignment="CENTER" spacing="10">
|
<VBox alignment="CENTER" spacing="10">
|
||||||
<!-- Label with logo -->
|
<!-- Label mit Logo -->
|
||||||
<Label text="CAS0NO" styleClass="table-title">
|
<Label text="CAS0NO" styleClass="table-title">
|
||||||
<graphic>
|
<graphic>
|
||||||
<ImageView fitHeight="30.0" preserveRatio="true">
|
<ImageView fitHeight="30.0" preserveRatio="true">
|
||||||
@@ -63,32 +63,32 @@
|
|||||||
</graphic>
|
</graphic>
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<!-- TODO: Placeholder: Will be replaced once the game engine is finished and can process real-world scenarios -->
|
<!-- TODO: Platzhalter: Wird ersetzt, sobald die GameEngine fertig ist und echte Einsätze verarbeiten kann -->
|
||||||
<Label fx:id="welcomeText" text="Setzen Sie Ihren Einsatz" styleClass="table-title" />
|
<Label fx:id="welcomeText" text="Setzen Sie Ihren Einsatz" styleClass="table-title" />
|
||||||
</VBox>
|
</VBox>
|
||||||
</VBox>
|
</VBox>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
|
|
||||||
<!-- Empty box in column 1: Creates space between the table box and the chat box -->
|
<!-- Leere-Box in Spalte 1: Schafft Platz zwischen dem Tisch-Box und der Chat-Box -->
|
||||||
<VBox GridPane.columnIndex="1"
|
<VBox GridPane.columnIndex="1"
|
||||||
alignment="CENTER"
|
alignment="CENTER"
|
||||||
minWidth="100"
|
minWidth="100"
|
||||||
minHeight="100">
|
minHeight="100">
|
||||||
<!-- Leave blank -->
|
<!-- Bleibt leer -->
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|
||||||
<!-- TODO: Placeholder: Chat box in column 2: -->
|
<!-- TODO: Platzhalter: Chat-Box in Spalte 2: -->
|
||||||
<fx:include source="components/Chatbox.fxml" GridPane.columnIndex="2"/>
|
<fx:include source="components/Chatbox.fxml" GridPane.columnIndex="2"/>
|
||||||
|
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
|
||||||
<!-- movable taskbar -->
|
<!-- verschiebbare Taskbar -->
|
||||||
<AnchorPane>
|
<AnchorPane>
|
||||||
<fx:include fx:id="taskbarInclude" source="gameuicomponents/Taskbar.fxml"/>
|
<fx:include fx:id="taskbarInclude" source="gameuicomponents/taskbar.fxml"/>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|
||||||
<!-- Opponent Status 1: One of three panels displaying the opponent's icon, name, and account balance -->
|
<!-- Gegner-Status 1: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt -->
|
||||||
<GridPane AnchorPane.leftAnchor="0.0"
|
<GridPane AnchorPane.leftAnchor="0.0"
|
||||||
AnchorPane.rightAnchor="0.0"
|
AnchorPane.rightAnchor="0.0"
|
||||||
AnchorPane.topAnchor="50">
|
AnchorPane.topAnchor="50">
|
||||||
@@ -99,11 +99,11 @@
|
|||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
|
|
||||||
<children>
|
<children>
|
||||||
<fx:include source="gameuicomponents/Playerstatus.fxml" GridPane.columnIndex="1"/>
|
<fx:include source="gameuicomponents/playerstatus.fxml" GridPane.columnIndex="1"/>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
|
||||||
<!-- Opponent Status 2: One of three panels displaying the opponent's icon, name, and account balance -->
|
<!-- Gegner-Status 2: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt -->
|
||||||
<GridPane AnchorPane.leftAnchor="0.0"
|
<GridPane AnchorPane.leftAnchor="0.0"
|
||||||
AnchorPane.rightAnchor="0.0"
|
AnchorPane.rightAnchor="0.0"
|
||||||
AnchorPane.topAnchor="20">
|
AnchorPane.topAnchor="20">
|
||||||
@@ -114,11 +114,11 @@
|
|||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
|
|
||||||
<children>
|
<children>
|
||||||
<fx:include source="gameuicomponents/Playerstatus.fxml" GridPane.columnIndex="1"/>
|
<fx:include source="gameuicomponents/playerstatus.fxml" GridPane.columnIndex="1"/>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
|
||||||
<!-- Opponent Status 3: One of three panels that displays the opponent's icon, name, and account balance -->
|
<!-- Gegner-Status 3: Eines von drei Panels, das Icon, Name und Kontostand des Mitspielers anzeigt -->
|
||||||
<GridPane AnchorPane.leftAnchor="0.0"
|
<GridPane AnchorPane.leftAnchor="0.0"
|
||||||
AnchorPane.rightAnchor="0.0"
|
AnchorPane.rightAnchor="0.0"
|
||||||
AnchorPane.topAnchor="50">
|
AnchorPane.topAnchor="50">
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
|
|
||||||
<children>
|
<children>
|
||||||
<fx:include source="gameuicomponents/Playerstatus.fxml" GridPane.columnIndex="1"/>
|
<fx:include source="gameuicomponents/playerstatus.fxml" GridPane.columnIndex="1"/>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|||||||
@@ -0,0 +1,155 @@
|
|||||||
|
.chat-box {
|
||||||
|
-fx-background-color: #0d9e3b;
|
||||||
|
-fx-background-radius: 58;
|
||||||
|
-fx-border-radius: 50;
|
||||||
|
-fx-border-color: #5c3d10 #3d260a #3d260a #5c3d10;
|
||||||
|
-fx-border-width: 12;
|
||||||
|
-fx-padding: 20;
|
||||||
|
-fx-effect: dropshadow(one-pass-box, rgba(0,0,0,1), 0, 0, 15, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-header {
|
||||||
|
-fx-text-fill: #ffffff;
|
||||||
|
-fx-font-size: 22px;
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
-fx-padding: 0 0 10 0;
|
||||||
|
-fx-effect: dropshadow(one-pass-box, #000000, 0, 0, 3, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-separator {
|
||||||
|
-fx-background-color: #ffffff;
|
||||||
|
-fx-min-height: 4px;
|
||||||
|
-fx-effect: dropshadow(one-pass-box, #000000, 0, 0, 3, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.black-input-field {
|
||||||
|
-fx-background-color: #1a1a1a;
|
||||||
|
-fx-text-fill: #ffffff;
|
||||||
|
-fx-font-family: "Courier New";
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
-fx-background-radius: 8;
|
||||||
|
-fx-border-radius: 8;
|
||||||
|
-fx-border-color: #444444;
|
||||||
|
-fx-border-width: 2;
|
||||||
|
-fx-padding: 5 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.black-input-field:hover {
|
||||||
|
-fx-translate-y: -3;
|
||||||
|
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.black-input-field:focused {
|
||||||
|
-fx-border-color: #ffffff;
|
||||||
|
-fx-background-color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-input-field {
|
||||||
|
-fx-background-color: #333333;
|
||||||
|
-fx-text-fill: #ffffff;
|
||||||
|
-fx-font-family: "Courier New";
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
-fx-background-radius: 8;
|
||||||
|
-fx-border-radius: 8;
|
||||||
|
-fx-border-color: #666666;
|
||||||
|
-fx-color-color: #cccccc;
|
||||||
|
-fx-border-width: 2;
|
||||||
|
-fx-padding: 5 12;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-input-field:hover {
|
||||||
|
-fx-translate-y: -3;
|
||||||
|
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-input-field:focused {
|
||||||
|
-fx-border-color: #ffffff;
|
||||||
|
-fx-background-color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yellow-button {
|
||||||
|
-fx-background-color: #b8860b;
|
||||||
|
-fx-border-color: #ffd700;
|
||||||
|
-fx-text-fill: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.red-button {
|
||||||
|
-fx-background-color: #8b0000;
|
||||||
|
-fx-border-color: #ff4444;
|
||||||
|
-fx-text-fill: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-button {
|
||||||
|
-fx-background-color: #333333;
|
||||||
|
-fx-border-color: #666666;
|
||||||
|
-fx-text-fill: #cccccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-button, .yellow-button, .red-button {
|
||||||
|
-fx-background-radius: 12;
|
||||||
|
-fx-border-radius: 12;
|
||||||
|
-fx-font-family: "Courier New";
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
-fx-border-width: 2;
|
||||||
|
-fx-padding: 6 15;
|
||||||
|
-fx-cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gray-button:hover, .yellow-button:hover, .red-button:hover {
|
||||||
|
-fx-translate-y: -3;
|
||||||
|
-fx-effect: dropshadow(one-pass-box, rgba(0, 0, 0, 0.8), 0, 0, 3, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-scroll-pane {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-background: transparent;
|
||||||
|
-fx-border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chat-VBox {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-background: transparent;
|
||||||
|
}
|
||||||
|
.scroll-pane {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-pane .scroll-bar:vertical {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-pane .scroll-bar .track {
|
||||||
|
-fx-background-color: #5c3d10;
|
||||||
|
-fx-background-insets: 0;
|
||||||
|
-fx-background-radius: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-pane .scroll-bar .thumb {
|
||||||
|
-fx-background-color: #3d260a;
|
||||||
|
-fx-background-insets: 0;
|
||||||
|
-fx-background-radius: 5;
|
||||||
|
-fx-pref-width: 6;
|
||||||
|
-fx-pref-height: 6;
|
||||||
|
-fx-padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-pane .scroll-bar:horizontal {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-pane .scroll-bar:horizontal .track {
|
||||||
|
-fx-background-color: #5c3d10;
|
||||||
|
-fx-background-radius: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-pane .scroll-bar:horizontal .thumb {
|
||||||
|
-fx-background-color: #3d260a;
|
||||||
|
-fx-background-radius: 5;
|
||||||
|
-fx-pref-height: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll-pane .scroll-bar:horizontal .thumb:hover {
|
||||||
|
-fx-pref-height: 10;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user