This commit is contained in:
@@ -2,6 +2,7 @@ package network.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.Random;
|
||||
|
||||
import common.Signal;
|
||||
import game.Game;
|
||||
@@ -15,13 +16,16 @@ public class Client {
|
||||
public final Signal onConnect = new Signal();
|
||||
public final Signal onDisconnect = new Signal();
|
||||
public final Signal onClosed = new Signal();
|
||||
public final Signal onGameStarted = new Signal();
|
||||
|
||||
String disconnectReason = null;
|
||||
|
||||
public Client(String address, short port) throws UnknownHostException, IOException {
|
||||
this.clientConnection = new ClientConnexion(address, port, this);
|
||||
this.game = new Game();
|
||||
login("Player2" + Math.random());
|
||||
// temp
|
||||
Random r = new Random();
|
||||
login("Player" + r.nextInt());
|
||||
}
|
||||
|
||||
public void login(String pseudo) {
|
||||
|
||||
Reference in New Issue
Block a user