Refactoring to remove all superflous classes related to the server

GameServerThread --> MainServerThread
All server classes consolidated into the gameServer package and all others removed

tags: #story[1055] #refactor #fix
This commit is contained in:
William Muir
2017-07-20 11:46:06 +12:00
parent e257602b78
commit 0c08f5a03c
2 changed files with 2 additions and 17 deletions
@@ -1,9 +1,6 @@
package seng302.controllers;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
@@ -13,11 +10,8 @@ import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.scene.text.Text;
import seng302.gameServer.GameServerThread;
import seng302.gameServer.GameStages;
import seng302.gameServer.GameState;
import seng302.gameServerWithThreading.MainServerThread;
import seng302.gameServerWithThreading.ServerToClientThread;
/**
* A class describing the actions of the lobby screen
@@ -32,7 +26,6 @@ public class LobbyController {
@FXML
private Text lobbyIpText;
private GameServerThread gameServerThread;
private static ObservableList competitors;
private void setContentPane(String jfxUrl) {
@@ -62,21 +55,12 @@ public class LobbyController {
setContentPane("/views/StartScreenView.fxml");
System.out.println("Leaving lobby!");
GameState.setCurrentStage(GameStages.CANCELLED);
gameServerThread.terminateGame();
// TODO: 20/07/17 wmu16 - Implement some way of terminating the game
}
public static void refreshCompetitors(){
Collection<String> competitorsIps = MainServerThread.getServerToClientThreads();
competitors.clear();
competitors.addAll(competitorsIps);
}
@FXML
public void readyButtonPressed() {
GameState.setCurrentStage(GameStages.RACING);
}
protected void setGameServerThread(GameServerThread gameServerThread) {
this.gameServerThread = gameServerThread;
}
}