mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
re-implemented existing functionality in UI
- Correct player count is shown in server list - Servers now advertise their capacity and number of players connected - Players can click join on the servers in the server list - Direct connect works - Can set max players / server name in host dialog - Server starts correctly when host clicked - Implemented boat customization - Implemented 'begin race button', and disabled it for players that aren't hosts - Added countdown timer in lobby - Fixed bug where app wouldn't close Tags: #story[1245]
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
package seng302.gameServer;
|
||||
|
||||
public class ServerDescription {
|
||||
private Integer capacity;
|
||||
private String address;
|
||||
private Integer portNum;
|
||||
private String serverName;
|
||||
private String mapName;
|
||||
private Integer spacesLeft;
|
||||
private Integer numPlayers;
|
||||
|
||||
public ServerDescription(String serverName, String mapName, Integer spacesLeft, String address, Integer portNum){
|
||||
public ServerDescription(String serverName, String mapName, Integer numPlayers, Integer capacity, String address, Integer portNum){
|
||||
this.serverName = serverName;
|
||||
this.mapName = mapName;
|
||||
this.spacesLeft = spacesLeft;
|
||||
this.numPlayers = numPlayers;
|
||||
this.address = address;
|
||||
this.portNum = portNum;
|
||||
this.capacity = capacity;
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +34,12 @@ public class ServerDescription {
|
||||
return address;
|
||||
}
|
||||
|
||||
public Integer spacesLeft() {
|
||||
return spacesLeft;
|
||||
public Integer getNumPlayers() {
|
||||
return numPlayers;
|
||||
}
|
||||
|
||||
public Integer getCapacity(){
|
||||
return capacity;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,6 +68,10 @@ public class ServerDescription {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.getCapacity().equals(other.getCapacity())){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user