hosting a game now continues to send out the info of the race
#story[1188]
This commit is contained in:
@@ -37,7 +37,7 @@ public class ClientAdress {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[ip='" + ip + '\'' +
|
||||
", port=" + port+"]";
|
||||
return "{ip='" + ip + '\'' +
|
||||
", port=" + port+"}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ public class MatchTable {
|
||||
entryItems.add(newEntry.getRequiredNumPlayers());
|
||||
entryItems.add(newEntry.getCurrentNumPlayers());
|
||||
|
||||
|
||||
this.matchTable.put(entryKey, entryItems);
|
||||
|
||||
}
|
||||
|
||||
public HashMap<TableKey, List> getMatchTable() {
|
||||
@@ -39,7 +39,6 @@ public class MatchTable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[MatchTable=" + matchTable +
|
||||
']';
|
||||
return "MatchTable=" + matchTable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class TableKey {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof TableKey)) return false;
|
||||
TableKey key = (TableKey) o;
|
||||
return ip == key.ip && port == key.port;
|
||||
return ip.equals(key.ip) && port == key.port;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class NetworkInterface {
|
||||
//this is just an alert message with no content
|
||||
clientsAddresses.add(new ClientAdress(receivePacket.getAddress().getHostAddress(), receivePacket.getPort()));
|
||||
}
|
||||
System.out.println(clientsAddresses);
|
||||
System.out.println("Clients: " + clientsAddresses);
|
||||
}catch (InvalidMessageException e){
|
||||
System.out.println(e);
|
||||
System.err.println("Message received that is not a hostedGamesRequest packet");
|
||||
|
||||
Reference in New Issue
Block a user