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() {
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user