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" +
|
" 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').";
|
" 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.
|
* Starts the TUI client. Creates a JLine terminal, loops through login → game → rematch.
|
||||||
*
|
*
|
||||||
* @throws InterruptedException if the thread is interrupted while waiting.
|
* @throws InterruptedException if the thread is interrupted while waiting.
|
||||||
*/
|
*/
|
||||||
public void main() throws InterruptedException {
|
private void start() throws InterruptedException {
|
||||||
try {
|
try {
|
||||||
System.setOut(new PrintStream(System.out, true, StandardCharsets.UTF_8));
|
System.setOut(new PrintStream(System.out, true, StandardCharsets.UTF_8));
|
||||||
System.setErr(new PrintStream(System.err, 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. */
|
/** Updates food/prestige labels, current-player highlight, card-icon opacity, and plays error shake if needed. */
|
||||||
private void updateSidePanel() {
|
private void updateSidePanel() {
|
||||||
infoText.setText("Round: "+Integer.toString(controller.miniModel.currentState.getRound()) + " • " + controller.miniModel.currentState.getGameStage().toString());
|
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();
|
String current = controller.miniModel.currentState.getCurrentPlayer().getUserName();
|
||||||
// ordine: building, artists, gatherers, inventors, builders, shamans, hunters
|
// ordine: building, artists, gatherers, inventors, builders, shamans, hunters
|
||||||
String[] fields = {"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;
|
selectedIndex = -1;
|
||||||
selectedFrame = null;
|
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);
|
boolean myTurn = chooser.equals(controller.myUsername);
|
||||||
|
|
||||||
updateBanner(chooser, myTurn);
|
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}. */
|
/** Returns the CSS style string for the totem name label, brightening it when {@code selected}. */
|
||||||
private String nameStyle(boolean selected) {
|
private String nameStyle(boolean selected) {
|
||||||
return "-fx-font-family: 'Cinzel'; -fx-font-size: 10; -fx-letter-spacing: 2;" +
|
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. */
|
/** Returns the totem name with only the first letter capitalised. */
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ public class AsciiTable {
|
|||||||
public String build() {
|
public String build() {
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
int maxWidth = rows.stream()
|
int maxWidth = rows.stream()
|
||||||
.mapToInt(x -> x.stream().mapToInt(y -> displayWidth(y)).max().getAsInt())
|
.mapToInt(x -> x.stream().mapToInt(AsciiTable::displayWidth).max().orElse(0))
|
||||||
.max().getAsInt() + 1;
|
.max().orElse(0) + 1;
|
||||||
sb.append(hline(s.tl(), s.mt(), s.tr(), maxWidth)).append('\n');
|
sb.append(hline(s.tl(), s.mt(), s.tr(), maxWidth)).append('\n');
|
||||||
|
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.*?>
|
||||||
<?import javafx.scene.image.ImageView?>
|
<?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"
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="it.polimi.ingsw.gc14.View.GUI.LoginFXMLController"
|
fx:controller="it.polimi.ingsw.gc14.View.GUI.LoginFXMLController"
|
||||||
style="-fx-background-color: #09060300;"
|
style="-fx-background-color: #09060300;"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
|
|
||||||
<StackPane xmlns="http://javafx.com/javafx"
|
<StackPane xmlns="http://javafx.com/javafx/26"
|
||||||
xmlns:fx="http://javafx.com/fxml"
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="it.polimi.ingsw.gc14.View.GUI.LeaderboardFXMLController"
|
fx:controller="it.polimi.ingsw.gc14.View.GUI.LeaderboardFXMLController"
|
||||||
fx:id="rootPane">
|
fx:id="rootPane">
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<?import javafx.scene.image.ImageView?>
|
<?import javafx.scene.image.ImageView?>
|
||||||
<?import javafx.scene.image.Image?>
|
<?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"
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
fx:controller="it.polimi.ingsw.gc14.View.GUI.TotemFXMLController"
|
fx:controller="it.polimi.ingsw.gc14.View.GUI.TotemFXMLController"
|
||||||
style="-fx-background-color: #09060300;">
|
style="-fx-background-color: #09060300;">
|
||||||
|
|||||||
Reference in New Issue
Block a user