⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mud.java

📁 Java实现简易Mud
💻 JAVA
字号:
package mud;import java.rmi.*;import java.util.Vector;import java.io.IOException;public class Mud {  public interface RemoteMudServer extends Remote{    public String getMudName() throws RemoteException;    public RemoteMudPlace getEntrance() throws RemoteException;    public RemoteMudPlace getNamedPlace(String name)        throws RemoteException,NoSuchPlace;    public void dump(String password,String filename)        throws RemoteException,BadPassword,IOException;  }  public interface RemoteMudPerson extends Remote{    public String getDescription() throws RemoteException;    public void tell(String message) throws RemoteException;  }  public interface RemoteMudPlace extends Remote{    public String getPlaceName() throws RemoteException;    public String getDescription() throws RemoteException ;    public Vector getNames() throws RemoteException;    public Vector getThings() throws RemoteException;    public Vector getExits() throws RemoteException;    public RemoteMudPerson getPerson(String name) throws RemoteException,NoSuchPerson;    public String examineThing(String name)throws RemoteException,NoSuchThing;    public RemoteMudPlace go(RemoteMudPerson who,String direction)        throws RemoteException,NotThere,AlreadyThere,NoSuchExit,LinkFailed;    public void speak(RemoteMudPerson speaker,String msg) throws RemoteException,NotThere;    public void act(RemoteMudPerson speaker,String msg) throws RemoteException,NotThere;    public void createThing(RemoteMudPerson who,String name,String description)        throws RemoteException,NotThere,AlreadyThere;    public void destoryThing(RemoteMudPerson who,String thing)        throws RemoteException,NotThere,NoSuchThing;    public void createPlace(RemoteMudPerson creator,String exit,String entrance,String name,String description)        throws RemoteException,NotThere,ExitAlreadyExists,PlaceAlreadyExists;    public void linkTo(RemoteMudPerson who,String exit,String hostname,String mudname,                       String placename)        throws RemoteException,NotThere,ExitAlreadyExists,NoSuchPlace;    public void close(RemoteMudPerson who,String exit)        throws RemoteException,NotThere,NoSuchExit;    public void exit(RemoteMudPerson who,String message)        throws RemoteException,NotThere;    public void enter(RemoteMudPerson who,String name,String message)        throws RemoteException,AlreadyThere;    public RemoteMudServer getServer() throws RemoteException;  }  public static class MudException extends Exception{};  public static class NotThere extends MudException{};  public static class AlreadyThere extends MudException{};  public static class NoSuchThing extends MudException{};  public static class NoSuchPerson extends MudException{};  public static class NoSuchExit extends MudException{};  public static class NoSuchPlace extends MudException{};  public static class ExitAlreadyExists extends MudException{};  public static class PlaceAlreadyExists extends MudException{};  public static class LinkFailed extends MudException{};  public static class BadPassword extends MudException{};  static final String mudPrefix="mud.";}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -