public void elaborateShootRequest(int x, int y, String side) { String controllerQuery = null; if (side.equals("guest")) { controllerQuery = cont.shootAtHostSide(x, y); } if (side.equals("host")) { controllerQuery = cont.shootAtGuestSide(x, y); } for (ServerService s : services) { s.sendMessageToClients(controllerQuery); } if (controllerQuery.startsWith("water")) waterResponse(controllerQuery); if (controllerQuery.startsWith("hit")) hitResponse(controllerQuery); if (controllerQuery.startsWith("destroyed")) destroyedResponse(controllerQuery); if (controllerQuery.startsWith("allShipsDestroyed")) allShipsDestroyed(controllerQuery); }