Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Collection<Player> movePlayersToGame(Player player) throws PlayerNotOnlineException, PlayerAlreadyInGameException, GameNotInProgressException
- {
- if(!this.isInGame())
- throw new GameNotInProgressException();
- if(!player.isOnline())
- throw new PlayerNotOnlineException(player, "Cannot move player to game because player is not online.");
- synchronized(busyPlayersInGame)
- {
- if(this.playersInGame.contains(player))
- throw new PlayerAlreadyInGameException(player, "Player is already in game.");
- this.playersInGame.add(player);
- }
- synchronized(busyPlayersInLobby)
- { this.playersInLobby.remove(player); }
- this.currentStage.tpPlayersToStartingPositions(player);
- return new ArrayList<Player>(Arrays.asList(player));
- }
- public Collection<Player> movePlayersToGame(Collection<? extends Player> players) throws GameNotInProgressException
- {
- if(!this.isInGame())
- throw new GameNotInProgressException();
- Collection<Player> returnVals = new ArrayList<Player>();
- // wip
- }
Advertisement
Add Comment
Please, Sign In to add comment