Merge branch 'story77' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into story77
This commit is contained in:
@@ -57,9 +57,10 @@ public class NetworkInterface {
|
|||||||
public void run() {
|
public void run() {
|
||||||
List<HostGame> games = new ArrayList<>();
|
List<HostGame> games = new ArrayList<>();
|
||||||
|
|
||||||
for(ClientAddress address: clientsAddresses) {
|
for(Map.Entry<ClientAddress, HostGame> tableEntry: matchTable.getMatchTable().entrySet()) {
|
||||||
HostGame game = matchTable.getMatchTable().get(address);
|
HostGame game = tableEntry.getValue();
|
||||||
if(game != null) {
|
if(game != null) {
|
||||||
|
System.out.println(game.getIp());
|
||||||
games.add(game);
|
games.add(game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class MatchBrowserLobbyInterface extends Observable {
|
|||||||
try {
|
try {
|
||||||
HostGamesRequest message = (HostGamesRequest) hostedGamesRequestDecoder.decode(data);
|
HostGamesRequest message = (HostGamesRequest) hostedGamesRequestDecoder.decode(data);
|
||||||
games = message.getKnownGames();
|
games = message.getKnownGames();
|
||||||
System.out.println(games);
|
System.out.println(games.get(0).getIp());
|
||||||
setChanged();
|
setChanged();
|
||||||
notifyObservers();
|
notifyObservers();
|
||||||
} catch (InvalidMessageException e) {
|
} catch (InvalidMessageException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user