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

Method connect

src/Graphwar/GameData.java:103–122  ·  view source on GitHub ↗
(String ip, int port)

Source from the content-addressed store, hash-verified

101 }
102
103 public void connect(String ip, int port) throws IOException
104 {
105 serverConnection = new ServerConnection(this, ip, port);
106
107 new Thread(serverConnection).start();
108
109 gameState = Constants.PRE_GAME;
110
111 drawingFunction = false;
112 exploding = false;
113 players = new ArrayList<Player>();
114 lastLocalHumanPlayer = null;
115 currentTurn = -1;
116 turnTimeUp = false;
117 nextTurnSent = false;
118
119 new Thread(this).start();
120
121 ((GlobalScreen)graphwar.getUI().getScreen(Constants.GLOBAL_ROOM_SCREEN)).refreshGameButton();
122 }
123
124 public List<Player> getPlayers()
125 {

Callers 3

ConnectionMethod · 0.80
joinGameMethod · 0.80
createGameMethod · 0.80

Calls 4

startMethod · 0.80
refreshGameButtonMethod · 0.80
getScreenMethod · 0.80
getUIMethod · 0.80

Tested by

no test coverage detected