亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mudclient.java

?? Examples From Java Examples in a Nutshell, 2nd Edition 書中的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
					       name + ":");                    location.createPlace(me, arg, back, name, desc);                }                // CLOSE: Close a named exit.  Note: only closes an exit                // uni-directionally, and does not destroy a place.                else if (cmd.equals("close")) {                    if (arg.length() == 0)                       throw new IllegalArgumentException("direction expected");                    location.close(me, arg);                }                // LINK: Create a new exit that connects to an existing place                // that may be in another MUD running on another host                else if (cmd.equals("link")) {                    if (arg.length() == 0)                       throw new IllegalArgumentException("direction expected");                    String host = getLine("What host are you linking to?: ");                    String mud =			getLine("What is the name of the MUD on that host?: ");                    String place =			getLine("What is the place name in that MUD?: ");                    location.linkTo(me, arg, host, mud, place);                    System.out.println("Don't forget to make a link from " +				       "there back to here!");                }                // DUMP: Save the state of this MUD into the named file,                // if the password is correct                else if (cmd.equals("dump")) {                    if (arg.length() == 0)                        throw new IllegalArgumentException("filename expected");                    String password = getLine("Password: ");                    location.getServer().dump(password, arg);                }                // QUIT: Quit the game                else if (cmd.equals("quit")) {                    try { location.exit(me, myname + " has quit."); }                     catch (Exception e) {}                    System.out.println("Bye.");                    System.out.flush();                    System.exit(0);                }                // HELP: Print out a big help message                else if (cmd.equals("help")) System.out.println(help);                // Otherwise, this is an unrecognized command.                else System.out.println("Unknown command.  Try 'help'.");            }            // Handle the many possible types of MudException            catch (MudException e) {                if (e instanceof NoSuchThing)                     System.out.println("There isn't any such thing here.");                 else if (e instanceof NoSuchPerson)                    System.out.println("There isn't anyone by that name here.");                else if (e instanceof NoSuchExit)                   System.out.println("There isn't an exit in that direction.");                else if (e instanceof NoSuchPlace)                     System.out.println("There isn't any such place.");                 else if (e instanceof ExitAlreadyExists)                    System.out.println("There is already an exit " +				       "in that direction.");                else if (e instanceof PlaceAlreadyExists)                    System.out.println("There is already a place " +				       "with that name.");                else if (e instanceof LinkFailed)                    System.out.println("That exit is not functioning.");                else if (e instanceof BadPassword)                     System.out.println("Invalid password.");                 else if (e instanceof NotThere)      // Shouldn't happen                    System.out.println("You can't do that when " +				       "you're not there.");                 else if (e instanceof AlreadyThere)  // Shouldn't happen                    System.out.println("You can't go there; " +				       "you're already there.");            }            // Handle RMI exceptions            catch (RemoteException e) {               System.out.println("The MUD is having technical difficulties.");               System.out.println("Perhaps the server has crashed:");               System.out.println(e);            }            // Handle everything else that could go wrong.            catch (Exception e) {                System.out.println("Syntax or other error:");                System.out.println(e);                System.out.println("Try using the 'help' command.");            }        }    }        /**      * This convenience method is used in several places in the     * runMud() method above.  It displays the name and description of     * the current place (including the name of the mud the place is in),      * and also displays the list of things, people, and exits in     * the current place.     **/    public static void look(RemoteMudPlace p) 	throws RemoteException, MudException    {        String mudname = p.getServer().getMudName(); // Mud name        String placename = p.getPlaceName();         // Place name        String description = p.getDescription();     // Place description        Vector things = p.getThings();               // List of things here        Vector names = p.getNames();                 // List of people here        Vector exits = p.getExits();                 // List of exits from here        // Print it all out        System.out.println("You are in: " + placename +			   " of the Mud: " + mudname);        System.out.println(description);        System.out.print("Things here: ");        for(int i = 0; i < things.size(); i++) {      // Display list of things            if (i > 0) System.out.print(", ");            System.out.print(things.elementAt(i));        }        System.out.print("\nPeople here: ");        for(int i = 0; i < names.size(); i++) {       // Display list of people            if (i > 0) System.out.print(", ");            System.out.print(names.elementAt(i));        }        System.out.print("\nExits are: ");        for(int i = 0; i < exits.size(); i++) {       // Display list of exits            if (i > 0) System.out.print(", ");            System.out.print(exits.elementAt(i));        }        System.out.println();                         // Blank line        System.out.flush();                           // Make it appear now!    }        /** This static input stream reads lines from the console */    static BufferedReader in =	new BufferedReader(new InputStreamReader(System.in));        /**      * A convenience method for prompting the user and getting a line of      * input.  It guarantees that the line is not empty and strips off      * whitespace at the beginning and end of the line.     **/    public static String getLine(String prompt) {        String line = null;        do {                      // Loop until a non-empty line is entered            try {                System.out.print(prompt);             // Display prompt                System.out.flush();                   // Display it right away                line = in.readLine();                 // Get a line of input                if (line != null) line = line.trim(); // Strip off whitespace            } catch (Exception e) {}                // Ignore any errors        } while((line == null) || (line.length() == 0));        return line;    }        /**     * A convenience method for getting multi-line input from the user.     * It prompts for the input, displays instructions, and guarantees that     * the input is not empty.  It also allows the user to enter the name of     * a file from which text will be read.     **/    public static String getMultiLine(String prompt) {        String text = "";        for(;;) {  // We'll break out of this loop when we get non-empty input            try {                BufferedReader br = in;       // The stream to read from                 System.out.println(prompt);   // Display the prompt                // Display some instructions                System.out.println("You can enter multiple lines.  " + 				   "End with a '.' on a line by itself.\n" +				   "Or enter a '<<' followed by a filename");                // Make the prompt and instructions appear now.                System.out.flush();                // Read lines                String line;                while((line = br.readLine()) != null) {    // Until EOF                    if (line.equals(".")) break;  // Or until a dot by itself                    // Or, if a file is specified, start reading from it                     // instead of from the console.                    if (line.trim().startsWith("<<")) {                              String filename = line.trim().substring(2).trim();                        br = new BufferedReader(new FileReader(filename));                        continue;  // Don't count the << as part of the input                    }		    // Add the line to the collected input                    else text += line + "\n";                  }                // If we got at least one line, return it.  Otherwise, chastise                // the user and go back to the prompt and the instructions.                if (text.length() > 0) return text;                else System.out.println("Please enter at least one line.");            }            // If there were errors, for example an IO error reading a file,            // display the error and loop again, displaying prompt and            // instructions            catch(Exception e) { System.out.println(e); }        }    }    /** This is the usage string that explains the available commands */    static final String help = 	"Commands are:\n" + 	"look: Look around\n" +	"examine <thing>: examine the named thing in more detail\n" +	"describe <person>: describe the named person\n" +	"go <direction>: go in the named direction (i.e. a named exit)\n" +	"say <message>: say something to everyone\n" +	"do <message>: tell everyone that you are doing something\n" +	"talk <person>: talk to one person.  Will prompt for message\n" +	"change: change how you are described.  Will prompt for input\n" +	"create <thing>: create a new thing.  Prompts for description \n" +	"destroy <thing>: destroy a thing.\n" + 	"open <direction>: create an adjoining place. Prompts for input\n"+	"close <direction>: close an exit from this place.\n" +	"link <direction>: create an exit to an existing place,\n" +	"     perhaps on another server.  Will prompt for input.\n" +	"dump <filename>: save server state.  Prompts for password\n" +	"quit: leave the Mud\n" +	"help: display this message";}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本va欧美va欧美va精品| 国产网红主播福利一区二区| 亚洲高清免费在线| 在线观看日产精品| 亚洲二区在线观看| 欧美日韩一级二级三级| 日韩电影免费一区| 日韩午夜激情av| 国产一区二区三区在线看麻豆| 久久久777精品电影网影网| 国产91丝袜在线播放| 一区精品在线播放| 欧美日韩午夜精品| 美女国产一区二区三区| 日本一区二区免费在线观看视频| 成人国产精品免费观看视频| 一区av在线播放| 日韩视频一区二区三区在线播放 | 亚洲人成7777| 欧美亚洲国产一区在线观看网站| 免费成人av在线| 欧美国产丝袜视频| 欧美日韩一区高清| 国产一区高清在线| 一区二区在线观看免费视频播放| 欧美电影影音先锋| 福利一区二区在线观看| 亚洲电影一级片| 久久综合九色欧美综合狠狠 | 久久蜜桃av一区精品变态类天堂| 99久久精品久久久久久清纯| 亚洲成a人片在线观看中文| 欧美精品一区视频| 色综合天天综合网天天狠天天 | 国产一区二区三区免费看| 国产精品毛片大码女人| 欧美日韩国产一级| 国产成人av电影在线| 亚洲福利国产精品| 国产精品久线观看视频| 日韩一区二区三| 99麻豆久久久国产精品免费优播| 日本欧美一区二区在线观看| 国产精品福利在线播放| 91精品国产91综合久久蜜臀| 91亚洲精品久久久蜜桃网站| 男人的天堂亚洲一区| 亚洲国产视频一区二区| 日本一区二区成人在线| 69成人精品免费视频| 99免费精品在线| 国产乱码字幕精品高清av| 五月天一区二区| 亚洲日本一区二区| 国产日韩欧美在线一区| 欧美一级生活片| 欧美日韩1区2区| 91浏览器在线视频| 欧美色精品天天在线观看视频| 韩国三级中文字幕hd久久精品| 午夜精品123| 亚洲最新视频在线播放| 亚洲国产精品精华液2区45| 日韩三级在线观看| 欧美日韩国产综合久久| 在线亚洲高清视频| 色欧美日韩亚洲| av资源网一区| av爱爱亚洲一区| 成人av在线看| a4yy欧美一区二区三区| 国产jizzjizz一区二区| 国产精品小仙女| 国内精品久久久久影院一蜜桃| 蜜桃视频一区二区三区| 日韩av午夜在线观看| 亚洲成人动漫av| 天天综合日日夜夜精品| 亚洲伊人伊色伊影伊综合网 | 亚洲国产另类av| 一区二区三区四区视频精品免费 | 亚州成人在线电影| 午夜视频一区二区| 亚洲国产另类精品专区| 日韩高清在线一区| 热久久一区二区| 国产在线日韩欧美| 国产成人在线视频网址| 国产传媒欧美日韩成人| 成人免费va视频| 99re热视频精品| 欧洲另类一二三四区| 欧美精品1区2区3区| 欧美精品v国产精品v日韩精品| 91精品欧美一区二区三区综合在| 91精品一区二区三区久久久久久 | 亚洲欧洲中文日韩久久av乱码| 综合欧美一区二区三区| 亚洲一区免费观看| 日本欧美韩国一区三区| 国产一区二区主播在线| 成人免费看视频| 欧美主播一区二区三区美女| 欧美精品日韩一区| 精品国产乱码久久久久久影片| 国产免费成人在线视频| 一区二区免费视频| 精品制服美女丁香| 成人av在线一区二区三区| 在线观看精品一区| 精品女同一区二区| 国产精品三级av| 亚洲高清在线精品| 国产在线精品一区二区不卡了| 99久久精品免费| 91精品国产综合久久小美女| 欧美激情一区二区三区四区 | 精品国产伦一区二区三区免费| 中文一区一区三区高中清不卡| 亚洲一区二区三区自拍| 久久激情五月激情| 91麻豆国产自产在线观看| 日韩欧美亚洲国产另类| 中文字幕在线一区| 日本v片在线高清不卡在线观看| 国产电影一区在线| 欧美人与性动xxxx| 国产精品国产三级国产专播品爱网| 香蕉影视欧美成人| 成人午夜视频福利| 5858s免费视频成人| 国产精品乱码一区二区三区软件| 视频一区二区三区中文字幕| 国产99精品国产| 91精品国产综合久久久久久 | 国产乱色国产精品免费视频| 欧美午夜电影网| 17c精品麻豆一区二区免费| 男人的天堂久久精品| 91网站黄www| 久久久久久久久久电影| 日韩成人免费电影| 一本色道久久综合亚洲精品按摩 | 51精品视频一区二区三区| 国产精品免费丝袜| 精品一区二区三区久久| 欧美三级电影精品| 中文字幕色av一区二区三区| 国产福利精品导航| 欧美r级在线观看| 午夜久久福利影院| 欧美亚州韩日在线看免费版国语版| 国产欧美日韩三级| 韩国午夜理伦三级不卡影院| 在线播放一区二区三区| 一区二区三区成人在线视频 | 91理论电影在线观看| 久久精品视频免费| 久久精品国产在热久久| 欧美一卡二卡三卡四卡| 午夜视黄欧洲亚洲| 色香色香欲天天天影视综合网| 亚洲国产精品精华液ab| 高清日韩电视剧大全免费| 久久久国产综合精品女国产盗摄| 美腿丝袜亚洲色图| 欧美一区二区不卡视频| 日本sm残虐另类| 91麻豆精品国产91久久久| 亚洲成人黄色小说| 91精品一区二区三区久久久久久 | 欧美色爱综合网| 亚洲一区二区欧美日韩| 欧美色欧美亚洲另类二区| 亚洲444eee在线观看| 欧美日韩小视频| 日韩二区三区四区| 精品奇米国产一区二区三区| 久久99国产精品尤物| 欧美成人video| 国精产品一区一区三区mba桃花| 久久久欧美精品sm网站| 粉嫩欧美一区二区三区高清影视| 欧美韩日一区二区三区| 成人禁用看黄a在线| 亚洲精品亚洲人成人网| 欧美日韩中文国产| 老鸭窝一区二区久久精品| 精品久久国产老人久久综合| 国产精品亚洲专一区二区三区 | 国产99一区视频免费| 中文字幕免费在线观看视频一区| 成人高清av在线| 亚洲一区二区成人在线观看| 欧美巨大另类极品videosbest | 欧美mv和日韩mv的网站| 黄色资源网久久资源365| 国产精品毛片久久久久久| 在线观看国产日韩| 久久99精品久久久久|