Fix: bug fixes and all version are up to date
This commit is contained in:
@@ -79,12 +79,16 @@ public class ClientLauncherTUI {
|
||||
" immediately take 1 \uD83C\uDF56 for each Hunter in your tribe (with or without the icon).\n" +
|
||||
" During Hunt Event, take \uD83C\uDF56 and gain PP based on your Hunter count (see 'details events').";
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
new ClientLauncherTUI().start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the TUI client. Creates a JLine terminal, loops through login → game → rematch.
|
||||
*
|
||||
* @throws InterruptedException if the thread is interrupted while waiting.
|
||||
*/
|
||||
public void main() throws InterruptedException {
|
||||
private void start() throws InterruptedException {
|
||||
try {
|
||||
System.setOut(new PrintStream(System.out, true, StandardCharsets.UTF_8));
|
||||
System.setErr(new PrintStream(System.err, true, StandardCharsets.UTF_8));
|
||||
|
||||
@@ -388,6 +388,7 @@ public class MainFXMLController {
|
||||
/** Updates food/prestige labels, current-player highlight, card-icon opacity, and plays error shake if needed. */
|
||||
private void updateSidePanel() {
|
||||
infoText.setText("Round: "+Integer.toString(controller.miniModel.currentState.getRound()) + " • " + controller.miniModel.currentState.getGameStage().toString());
|
||||
if (controller.miniModel.currentState.getCurrentPlayer() == null) return;
|
||||
String current = controller.miniModel.currentState.getCurrentPlayer().getUserName();
|
||||
// ordine: building, artists, gatherers, inventors, builders, shamans, hunters
|
||||
String[] fields = {"building", "artists", "gatherers", "inventors", "builders", "shamans", "hunters"};
|
||||
|
||||
@@ -63,7 +63,8 @@ public class TotemFXMLController {
|
||||
selectedIndex = -1;
|
||||
selectedFrame = null;
|
||||
|
||||
String chooser = controller.miniModel.currentState.getCurrentPlayer().getUserName(); // adatta al tuo campo
|
||||
if (controller.miniModel.currentState.getCurrentPlayer() == null) return;
|
||||
String chooser = controller.miniModel.currentState.getCurrentPlayer().getUserName();
|
||||
boolean myTurn = chooser.equals(controller.myUsername);
|
||||
|
||||
updateBanner(chooser, myTurn);
|
||||
@@ -207,7 +208,7 @@ public class TotemFXMLController {
|
||||
/** Returns the CSS style string for the totem name label, brightening it when {@code selected}. */
|
||||
private String nameStyle(boolean selected) {
|
||||
return "-fx-font-family: 'Cinzel'; -fx-font-size: 10; -fx-letter-spacing: 2;" +
|
||||
"-fx-text-fill: " + (selected ? "#ffffff" : "ffffff") + ";";
|
||||
"-fx-text-fill: " + (selected ? "#ffffff" : "#ffffff") + ";";
|
||||
}
|
||||
|
||||
/** Returns the totem name with only the first letter capitalised. */
|
||||
|
||||
@@ -48,8 +48,8 @@ public class AsciiTable {
|
||||
public String build() {
|
||||
var sb = new StringBuilder();
|
||||
int maxWidth = rows.stream()
|
||||
.mapToInt(x -> x.stream().mapToInt(y -> displayWidth(y)).max().getAsInt())
|
||||
.max().getAsInt() + 1;
|
||||
.mapToInt(x -> x.stream().mapToInt(AsciiTable::displayWidth).max().orElse(0))
|
||||
.max().orElse(0) + 1;
|
||||
sb.append(hline(s.tl(), s.mt(), s.tr(), maxWidth)).append('\n');
|
||||
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<StackPane xmlns="http://javafx.com/javafx/21"
|
||||
<StackPane xmlns="http://javafx.com/javafx/26"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="it.polimi.ingsw.gc14.View.GUI.LoginFXMLController"
|
||||
style="-fx-background-color: #09060300;"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<StackPane xmlns="http://javafx.com/javafx"
|
||||
xmlns:fx="http://javafx.com/fxml"
|
||||
<StackPane xmlns="http://javafx.com/javafx/26"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="it.polimi.ingsw.gc14.View.GUI.LeaderboardFXMLController"
|
||||
fx:id="rootPane">
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<StackPane xmlns="http://javafx.com/javafx/21"
|
||||
<StackPane xmlns="http://javafx.com/javafx/26"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="it.polimi.ingsw.gc14.View.GUI.TotemFXMLController"
|
||||
style="-fx-background-color: #09060300;">
|
||||
|
||||
Reference in New Issue
Block a user