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

Method switchSide

src/Graphwar/GameData.java:375–386  ·  view source on GitHub ↗
(Player player)

Source from the content-addressed store, hash-verified

373 }
374
375 public void switchSide(Player player)
376 {
377 int otherTeam = Constants.TEAM1;
378
379 if(player.getTeam() == Constants.TEAM1)
380 {
381 otherTeam = Constants.TEAM2;
382 }
383
384 String message = NetworkProtocol.SET_TEAM+"&"+otherTeam+"&"+player.getID();
385 serverConnection.sendMessage(message);
386 }
387
388 public boolean isAngleUp()
389 {

Callers 1

actionPerformedMethod · 0.80

Calls 3

getTeamMethod · 0.45
getIDMethod · 0.45
sendMessageMethod · 0.45

Tested by

no test coverage detected