(String[] info)
| 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 | { |
no test coverage detected