Package com.threerings.util

Examples of com.threerings.util.Name


        // if we're the inviter, do some inviting
        if (_body.username.equals("inviter")) {
            // send the invitation
            TestConfig config = new TestConfig();
            _pardtr.invite(new Name("invitee"), config, this);
        }
    }
View Full Code Here


        labelC.gridwidth = GridBagConstraints.REMAINDER;

        Name[] names = _turnObj.getPlayers();
        GameObject gameobj = (GameObject)_turnObj;
        boolean[] winners = gameobj.winners;
        Name holder = _turnObj.getTurnHolder();
        for (int ii=0, jj=0; ii < names.length; ii++, jj++) {
            if (names[ii] == null) continue;

            JLabel iconLabel = new JLabel();
            if (winners == null) {
View Full Code Here

            // message
            int uidx = text.indexOf(username);
            String message = text.substring(uidx + username.length()).trim();

            // request to send this text as a tell message
            _ctx.getChatDirector().requestTell(new Name(username), message, null);

        } else if (text.startsWith("/clear")) {
            // clear the chat box
            _ctx.getChatDirector().clearDisplays();
View Full Code Here

            // abort, abort
            return;
        }

        // get the player name and sanity-check again
        Name name = _tgmgr.getPlayerName(_turnIdx);
        if (name == null) {
            log.warning("startTurn() called with invalid player [game=" + where() +
                        ", turnIdx=" + _turnIdx + "].");
            return;
        }
View Full Code Here

    // documentation inherited
    public void attributeChanged (AttributeChangedEvent event)
    {
        // handle turn changes
        if (event.getName().equals(_thfield)) {
            Name name = (Name)event.getValue();
            Name oname = (Name)event.getOldValue();
            if (TurnGameObject.TURN_HOLDER_REPLACED.equals(name) ||
                TurnGameObject.TURN_HOLDER_REPLACED.equals(oname)) {
                // small hackery: ignore the turn holder being set to
                // TURN_HOLDER_REPLACED as it means that we're replacing
                // the current turn holder rather than switching turns;
View Full Code Here

            // create our client instance
            _client = new MiCasaClient();
            _client.init(_frame);

            Name username = new Name(requireParameter("username"));
            String authkey = requireParameter("authkey");
            String server = getCodeBase().getHost();

            Client client = _client.getContext().getClient();
View Full Code Here

            // fill in information on the AIs
            int acount = (config.ais == null) ? 0 : config.ais.length;
            for (int ii = 0; ii < acount; ii++) {
                // TODO: handle this naming business better
                players[ii] = new Name("AI " + (ii+1));
            }

        } else {
            players = createPlayerNamesArray(0);
            bodyOids = new int[0];
View Full Code Here

        int[][] newTeams = new int[teams.length][];
        Name[] plist = getPlayers();
        for (int ii=0; ii < teams.length; ii++) {
            set.clear();
            for (int jj=0; jj < teams[ii].length; jj++) {
                Name occ = players[teams[ii][jj]];
                if (occ != null) {
                    set.add(ListUtil.indexOf(plist, occ));
                }
            }
            newTeams[ii] = set.toIntArray();
View Full Code Here

     * Replaces the player at the specified index and calls {@link #playerWasReplaced} to let
     * derived classes and delegates know what's going on.
     */
    public void replacePlayer (final int pidx, final Name player)
    {
        final Name oplayer = _gameobj.players[pidx];
        _gameobj.setPlayersAt(player, pidx);

        // allow derived classes to respond
        playerWasReplaced(pidx, oplayer, player);

View Full Code Here

        int ploid = _playerOids[playerIdx];
        if (ploid > 0) {
            return (BodyObject)_omgr.getObject(ploid);
        }
        // otherwise look them up by name
        Name name = getPlayerName(playerIdx);
        return (name == null) ? null : _locator.lookupBody(name);
    }
View Full Code Here

TOP

Related Classes of com.threerings.util.Name

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.