Package za.co.wethinkcode.robots.server
Class Server
java.lang.Object
za.co.wethinkcode.robots.server.Server
Represents the Robot World server.
This class is responsible for loading the server configuration, creating the game world, starting the server, accepting client
connections, and managing the server
-
Constructor Summary
ConstructorsConstructorDescriptionServer(WorldConfig config, World world, String ipAddress) The standard constructor of a new Server -
Method Summary
-
Constructor Details
-
Server
The standard constructor of a new Server- Parameters:
config- the config of the world containing things like obstacles etcworld- the domain object of the world that robots are connecting toipAddress- the IP address of the current server.
-
-
Method Details
-
main
The main method of the Server class.- Parameters:
args- Command Line Arguments
-
newServer
Static style configuration stage for setting up a server.This sets up
registerShutdownHook()as well as applying the necessary overrides- Parameters:
args- args passed in directly- Returns:
- the configured
Server - Throws:
ServerInitilisationError
-