MCPcopy Create free account
hub / github.com/catabriga/graphwar / joinGlobalServer

Method joinGlobalServer

src/Graphwar/GlobalClient.java:99–112  ·  view source on GitHub ↗
(String ip, int port, String playerName)

Source from the content-addressed store, hash-verified

97
98
99 public void joinGlobalServer(String ip, int port, String playerName) throws IOException
100 {
101 connection = new Connection(ip, port);
102
103 connection.sendMessage(URLEncoder.encode(playerName,"UTF-8"));
104
105 this.localPlayer = playerName;
106
107 this.running = true;
108 new Thread(this).start();
109
110 ((PreGameScreen)graphwar.getUI().getScreen(Constants.PRE_GAME_SCREEN)).refreshGlobalButton();
111 ((GameScreen)graphwar.getUI().getScreen(Constants.GAME_SCREEN)).refreshGlobalButton();
112 }
113
114 public String getIP(int roomNum)
115 {

Callers 1

joinGlobalMethod · 0.45

Calls 5

startMethod · 0.80
getScreenMethod · 0.80
getUIMethod · 0.80
sendMessageMethod · 0.45
refreshGlobalButtonMethod · 0.45

Tested by

no test coverage detected