Uses of Class
za.co.wethinkcode.robots.server.worldinfo.WorldState
Packages that use WorldState
Package
Description
This package encapsulates the behavior of all commands sent by a client to be executed on the server
Their unevaluated and evaluated versions are contained here.
This package encapsulates the main entry point of the server, along with the logic of a single thread
This package contains the functionality of all server specific commands
All classes in this package manage how robots work on the serverside
Classes that store info about how the world is created and managed
This package contains all classes shared between the server and client binary
It primarily contains enums and interfaces
-
Uses of WorldState in za.co.wethinkcode.robots.server.clientCommands
Methods in za.co.wethinkcode.robots.server.clientCommands that return WorldStateModifier and TypeMethodDescriptionLaunchClientCommand.LaunchCommandResult.getNextWorldState()Get the WorldState that the stateful command was evaluated based on.Stateful.getNextWorldState()Get the WorldState that the stateful command was evaluated based onLaunchClientCommand.LaunchCommandResult.getWorldState()Gets the worldState that the robot was launched into.Methods in za.co.wethinkcode.robots.server.clientCommands with parameters of type WorldStateModifier and TypeMethodDescriptionClientCommand.execute(ServerRobot target, Map<String, Argument> args, WorldState worldState) Overload of execute method that supports passing in a robot as the target for a commandLaunchClientCommand.execute(Map<String, Argument> args, WorldState worldState) LaunchClientCommand.execute(ServerRobot target, Map<String, Argument> args, WorldState worldState) Overload of execute method that supports passing in a robot as the target for a commandLookClientCommand.execute(Map<String, Argument> args, WorldState worldState) LookClientCommand.execute(ServerRobot target, Map<String, Argument> args, WorldState worldState) StateClientCommand.execute(Map<String, Argument> args, WorldState worldState) StateClientCommand.execute(ServerRobot target, Map<String, Argument> args, WorldState worldState) Constructors in za.co.wethinkcode.robots.server.clientCommands with parameters of type WorldStateModifierConstructorDescriptionLaunchCommandResult(InternalResponseCode response, ServerRobot robot, WorldState worldState, Position spawn) LookClientCommand(LookCommandRequest lookCommandRequest, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Standard constructor for the Look command from a client before evaluationLookClientCommandResult(ServerRobot target, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) StateClientCommand(StateCommandRequest req, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) Standard constructor for the state command from a client before evaluationStateCommandResult(ServerRobot target, WorldState worldState, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Uses of WorldState in za.co.wethinkcode.robots.server.networking
Methods in za.co.wethinkcode.robots.server.networking that return WorldStateModifier and TypeMethodDescriptionServerSingleThread.getNextWorldState()public void run() { try { String messageFromClient; while((messageFromClient = in.readLine()) != null) { try { //Takes in a request from a client ClientCommandRequest request = mapper.readValue(messageFromClient, ClientCommandRequest.class); //Creates a new command from it ClientCommand command = ClientCommandFactory.createCommand(request.getCommand(), request, this.currentWorldState, this.mapper); //Evaluates that command into a result ClientCommandResult commandResult = (ClientCommandResult) command.execute(request.getArgumentsMap(),this.currentWorldState); //Creates a response based on that result ServerResponse serverResponse = ServerResponseFactory.create(commandResult); //Sends that response back to the client mapper.writeValue(out,serverResponse); String tempO = request.getRobotName(); System.out.println("Message \"" + messageFromClient + "\" from " + clientMachine); out.println(tempO); out.println("Thanks for this message: "+messageFromClient); } catch (Exception e) { // throw new RuntimeException(e); out.println(e.getMessage()); } } } catch(IOException ex) { System.out.println("Shutting down single client server"); } finally { closeQuietly(); } }Constructors in za.co.wethinkcode.robots.server.networking with parameters of type WorldStateModifierConstructorDescriptionServerSingleThread(Socket socket, WorldState currentWorldState, ClientCommandFactory commandFactory, WorldStateIdentity sharedIdentity) Constructor OverLoad for the single Thread execution of server Logic. -
Uses of WorldState in za.co.wethinkcode.robots.server.serverCommands
Methods in za.co.wethinkcode.robots.server.serverCommands with parameters of type WorldStateModifier and TypeMethodDescriptionDumpCommand.execute(Map<String, Argument> args, WorldState worldstate) QuitCommand.execute(Map<String, Argument> args, WorldState worldstate) RobotsCommand.execute(Map<String, Argument> args, WorldState worldstate) Constructors in za.co.wethinkcode.robots.server.serverCommands with parameters of type WorldStateModifierConstructorDescriptionDumpCommandResult(Map<String, Argument> args, WorldState worldState, InternalResponseCode internalResponseCode) Standard Constructor for Dump Command ResultRobotsCommandResult(WorldState worldstate) -
Uses of WorldState in za.co.wethinkcode.robots.server.serverRobot
Methods in za.co.wethinkcode.robots.server.serverRobot with parameters of type WorldStateModifier and TypeMethodDescriptionServerBotFactory.create(String name, RobotKind kind, Integer maxShieldStrength, Integer maximumShots, WorldState worldState) Create a new server robotConstructors in za.co.wethinkcode.robots.server.serverRobot with parameters of type WorldStateModifierConstructorDescriptionBoringServerBot(String name, WorldState worldState) Constructor for a Boring server robot with a name and worldStateServerRobot(String name, RobotKind kind, Integer maxShieldStrength, Integer maximumShots, WorldState worldState) Best constructor for server side bots that allows for spawn finding -
Uses of WorldState in za.co.wethinkcode.robots.server.worldinfo
Methods in za.co.wethinkcode.robots.server.worldinfo that return WorldStateModifier and TypeMethodDescriptionMutableWorld.getWorldState()Retrieve a new WorldState from the mutableWorldWorldStateIdentity.getWorldState()Standard getter of the World State from this class's Atomic PointerConstructor parameters in za.co.wethinkcode.robots.server.worldinfo with type arguments of type WorldStateModifierConstructorDescriptionWorldStateIdentity(AtomicReference<WorldState> initialWorldState) Constructor for this WorldState Identity