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

Method fireFunctionMessage

src/Graphwar/GameData.java:901–925  ·  view source on GitHub ↗
(String[] info)

Source from the content-addressed store, hash-verified

899 }
900
901 private void fireFunctionMessage(String[] info) throws Exception
902 {
903 if(info.length == 3 && drawingFunction == false)
904 {
905 int playerID = Integer.parseInt(info[1]);
906 String function = URLDecoder.decode(info[2], "UTF-8");
907
908 if(players.get(currentTurn).getID() == playerID)
909 {
910 Player player = getPlayer(playerID);
911
912 processFunction(player, function);
913
914 this.drawingFunction = true;
915 this.timeStartedDrawingFunction = System.currentTimeMillis();
916
917 ((GameScreen)graphwar.getUI().getScreen(Constants.GAME_SCREEN)).startDrawingFunction();
918
919 if(sayFunc)
920 {
921 ((GameScreen)graphwar.getUI().getScreen(Constants.GAME_SCREEN)).addChat(player, function);
922 }
923 }
924 }
925 }
926
927 public boolean isDrawingFunction()
928 {

Callers 1

handleMessageMethod · 0.95

Calls 7

getPlayerMethod · 0.95
processFunctionMethod · 0.95
getScreenMethod · 0.80
getUIMethod · 0.80
getIDMethod · 0.45
startDrawingFunctionMethod · 0.45
addChatMethod · 0.45

Tested by

no test coverage detected