Fixes #33
All checks were successful
Linux arm64 / Build (push) Successful in 38s

This commit is contained in:
2025-02-02 10:27:42 +01:00
parent 4ee29d8f50
commit 06efbf649b
3 changed files with 12 additions and 9 deletions

View File

@@ -14,12 +14,12 @@ public class ConnexionStatusView extends BaseView {
private String displayText = "Connecting ...";
public ConnexionStatusView(StateMachine stateMachine, String address, short port)
public ConnexionStatusView(StateMachine stateMachine, String pseudo, String address, short port)
throws UnknownHostException, IOException {
super(stateMachine);
Thread t = new Thread(() -> {
try {
this.client = new Client(address, port);
this.client = new Client(pseudo, address, port);
bindListeners();
} catch (IOException e) {
e.printStackTrace();
@@ -29,12 +29,13 @@ public class ConnexionStatusView extends BaseView {
t.start();
}
public ConnexionStatusView(StateMachine stateMachine, short port) throws UnknownHostException, IOException {
public ConnexionStatusView(StateMachine stateMachine, String pseudo, short port)
throws UnknownHostException, IOException {
super(stateMachine);
Thread t = new Thread(() -> {
try {
this.server = new Server(port);
this.client = new Client("localhost", port);
this.client = new Client(pseudo, "localhost", port);
bindListeners();
} catch (IOException e) {
e.printStackTrace();