David Wu 8 years ago
commit c750b806e0

@ -57,9 +57,10 @@ public class NetworkInterface {
public void run() {
List<HostGame> games = new ArrayList<>();
for(ClientAddress address: clientsAddresses) {
HostGame game = matchTable.getMatchTable().get(address);
for(Map.Entry<ClientAddress, HostGame> tableEntry: matchTable.getMatchTable().entrySet()) {
HostGame game = tableEntry.getValue();
if(game != null) {
System.out.println(game.getIp());
games.add(game);
}
}

@ -47,7 +47,7 @@ public class MatchBrowserLobbyInterface extends Observable {
try {
HostGamesRequest message = (HostGamesRequest) hostedGamesRequestDecoder.decode(data);
games = message.getKnownGames();
System.out.println(games);
System.out.println(games.get(0).getIp());
setChanged();
notifyObservers();
} catch (InvalidMessageException e) {

Loading…
Cancel
Save