forked from IF-LK-2020/wordle
set ip and port
This commit is contained in:
parent
031f73abfa
commit
e3e899908f
|
@ -11,10 +11,11 @@ public class Game {
|
||||||
private String[] words;
|
private String[] words;
|
||||||
private int count;
|
private int count;
|
||||||
|
|
||||||
public Game(WordleServer wordleServer) {
|
public Game(WordleServer wordleServer, String pClientIP, int pClientPort) {
|
||||||
|
|
||||||
this.wordleServer = wordleServer;
|
this.wordleServer = wordleServer;
|
||||||
|
this.ip = pClientIP;
|
||||||
|
this.port = pClientPort;
|
||||||
|
|
||||||
user = new User();
|
user = new User();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class WordleServer extends Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void processNewConnection( String pClientIP, int pClientPort ) {
|
public void processNewConnection( String pClientIP, int pClientPort ) {
|
||||||
games.append(new Game(this));
|
games.append(new Game(this, pClientIP, pClientPort));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue