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

Method setReadyMessage

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

Source from the content-addressed store, hash-verified

712 }
713
714 private void setReadyMessage(String[] info) throws Exception
715 {
716 int playerID = Integer.parseInt(info[1]);
717 boolean ready = Integer.parseInt(info[2])!=0;
718
719 Player player = this.getPlayer(playerID);
720
721 player.setReady(ready);
722
723 if(gameState == Constants.PRE_GAME)
724 {
725 ((PreGameScreen)graphwar.getUI().getScreen(Constants.PRE_GAME_SCREEN)).repaint();
726 }
727
728 if(player.isLocalPlayer())
729 {
730 updateReadyButton();
731 }
732
733 if(ready == false && countingDown==true)
734 {
735 if(countdowner != null)
736 {
737 countdowner.stop();
738 }
739
740 displaySystemMessage("Game start cancelled.");
741 }
742 }
743
744 private void updateReadyButton()
745 {

Callers 1

handleMessageMethod · 0.95

Calls 8

getPlayerMethod · 0.95
setReadyMethod · 0.95
isLocalPlayerMethod · 0.95
updateReadyButtonMethod · 0.95
displaySystemMessageMethod · 0.95
getScreenMethod · 0.80
getUIMethod · 0.80
stopMethod · 0.45

Tested by

no test coverage detected