(String function)
| 284 | } |
| 285 | |
| 286 | public void sendFunction(String function) |
| 287 | { |
| 288 | Player currentPlayer = getCurrentTurnPlayer(); |
| 289 | |
| 290 | if(currentPlayer.isLocalPlayer() && drawingFunction == false) |
| 291 | { |
| 292 | try |
| 293 | { |
| 294 | @SuppressWarnings("unused") |
| 295 | Function func = new Function(function); |
| 296 | } |
| 297 | catch (MalformedFunction e) |
| 298 | { |
| 299 | //Function is wrong... dont send it |
| 300 | return; |
| 301 | } |
| 302 | |
| 303 | try |
| 304 | { |
| 305 | String message = NetworkProtocol.FIRE_FUNC+"&"+currentPlayer.getID()+"&"+URLEncoder.encode(function, "UTF-8"); |
| 306 | serverConnection.sendMessage(message); |
| 307 | } |
| 308 | catch (UnsupportedEncodingException e) |
| 309 | { |
| 310 | e.printStackTrace(); |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | public void nextMode() |
| 316 | { |
no test coverage detected