(String[] info)
| 631 | } |
| 632 | |
| 633 | private void addPlayerMessage(String[] info) throws Exception |
| 634 | { |
| 635 | int playerID = Integer.parseInt(info[1]); |
| 636 | String name = URLDecoder.decode(info[2], "UTF-8"); |
| 637 | int team = Integer.parseInt(info[3]); |
| 638 | boolean local = Integer.parseInt(info[4]) != 0; |
| 639 | int numSoldiers = Integer.parseInt(info[5]); |
| 640 | boolean ready = Integer.parseInt(info[6]) != 0; |
| 641 | |
| 642 | Player player; |
| 643 | |
| 644 | if(local && !nextPCs.isEmpty()) |
| 645 | { |
| 646 | int level = nextPCs.poll().intValue(); |
| 647 | player = new ComputerPlayer(name, playerID, team, local, numSoldiers, ready, level, graphwar); |
| 648 | } |
| 649 | else |
| 650 | { |
| 651 | player = new Player(name, playerID, team, local, numSoldiers, ready); |
| 652 | } |
| 653 | players.add(player); |
| 654 | |
| 655 | ((PreGameScreen)graphwar.getUI().getScreen(Constants.PRE_GAME_SCREEN)).addPlayer(player); |
| 656 | ((PreGameScreen)graphwar.getUI().getScreen(Constants.PRE_GAME_SCREEN)).addChat(null,player.getName()+" has joined the game."); |
| 657 | |
| 658 | graphwar.getGlobalClient().sendRoomStatus(); |
| 659 | } |
| 660 | |
| 661 | private void addChatMessage(String[] info) throws Exception |
| 662 | { |
no test coverage detected