]> code.citadel.org Git - citadel.git/commitdiff
Added goto commands, zap room, room info window, and general bug fixed.
authorChilly <chilly@uncensored.citadel.org>
Mon, 16 Aug 1999 16:16:32 +0000 (16:16 +0000)
committerChilly <chilly@uncensored.citadel.org>
Mon, 16 Aug 1999 16:16:32 +0000 (16:16 +0000)
shaggy/citGui.java
shaggy/citReply.java
shaggy/citadel.java
shaggy/enterRoomWindow.java
shaggy/floor.java
shaggy/mainPanel.java
shaggy/messagePanel.java
shaggy/roomFrame.java
shaggy/roomInfo.java
shaggy/roomMap.java

index f6ce7a3847d916189bd2af878081b03bb46d4d6d..5df769a021e23319859daca727ad7e2798d2c4c4 100644 (file)
@@ -4,76 +4,76 @@ import java.awt.event.*;
 
 
 public class citGui {
-  JFrame       frame;
-  CardLayout   cdLayout;
-  Container    c;
-  hostPanel    hp;
-  loginPanel   lp;
-  mainPanel    mp;
-  logoffPanel  lfp;
-
-  public citGui() {
-    frame = new JFrame( "Shaggy" );
-    c = frame.getContentPane();
-
-    c.setLayout( cdLayout = new CardLayout() );
-    c.add( "Host", hp = new hostPanel() );
-    c.add( "Login", lp = new loginPanel() );
-    c.add( "Main", mp = new mainPanel() );
-    c.add( "Logoff", lfp = new logoffPanel() );
-
-    frame.addWindowListener( new WindowAdapter() {
-      public void windowClosing( WindowEvent e ) {
-       citadel.me.closeFrame();
-       System.exit( 0 );
-      }
-    });
-
-    frame.pack();
-    frame.setVisible( true );
-  }
-
-  public void showHostBrowser() {
-    cdLayout.show( c, "Host" );
-    hp.refresh();
-  }
-
-  public void showLoginPanel() {
-    cdLayout.show( c, "Login" );
-    lp.refresh();
-  }
-
-  public void showLoginPanel( String user, String pass ) {
-    showLoginPanel();
-    lp.setDefault( user, pass );
-    if( (user == null) || (user.length()==0) ||
-       (pass == null) || (pass.length()==0) ) return;
-    citadel.me.authenticate( user, pass );
-  }
-
-  public void showMainPanel() {
-    cdLayout.show( c, "Main" );
-    mp.refresh();
-  }
-
-  public void showLogoffPanel() {
-    cdLayout.show( c, "Logoff" );
-    lfp.refresh();
-  }
-
-  public void errMsg( String reason ) {
-    JOptionPane.showMessageDialog(frame,
-                                 reason,
-                                 "Inane error",
-                                 JOptionPane.ERROR_MESSAGE);
-  }
-
-  public void warning( String text ) {
-    JOptionPane.showMessageDialog(frame,
-                                 text,
-                                 "What is this?",
-                                 JOptionPane.WARNING_MESSAGE);
-  }
+    JFrame     frame;
+    CardLayout cdLayout;
+    Container  c;
+    hostPanel  hp;
+    loginPanel lp;
+    mainPanel  mp;
+    logoffPanel        lfp;
+
+    public citGui() {
+       frame = new JFrame( "Shaggy" );
+       c = frame.getContentPane();
+
+       c.setLayout( cdLayout = new CardLayout() );
+       c.add( "Host", hp = new hostPanel() );
+       c.add( "Login", lp = new loginPanel() );
+       c.add( "Main", mp = new mainPanel() );
+       c.add( "Logoff", lfp = new logoffPanel() );
+
+       frame.addWindowListener( new WindowAdapter() {
+           public void windowClosing( WindowEvent e ) {
+               citadel.me.closeFrame();
+               System.exit( 0 );
+           }
+       });
+
+       frame.pack();
+       frame.setVisible( true );
+    }
+
+    public void showHostBrowser() {
+       cdLayout.show( c, "Host" );
+       hp.refresh();
+    }
+
+    public void showLoginPanel() {
+       cdLayout.show( c, "Login" );
+       lp.refresh();
+    }
+
+    public void showLoginPanel( String user, String pass ) {
+       showLoginPanel();
+       lp.setDefault( user, pass );
+       if( (user == null) || (user.length()==0) ||
+           (pass == null) || (pass.length()==0) ) return;
+       citadel.me.authenticate( user, pass );
+    }
+
+    public void showMainPanel() {
+       cdLayout.show( c, "Main" );
+       mp.refresh();
+    }
+
+    public void showLogoffPanel() {
+       cdLayout.show( c, "Logoff" );
+       lfp.refresh();
+    }
+
+    public void errMsg( String reason ) {
+       JOptionPane.showMessageDialog(frame,
+                                     reason,
+                                     "Inane error",
+                                     JOptionPane.ERROR_MESSAGE);
+    }
+
+    public void warning( String text ) {
+       JOptionPane.showMessageDialog(frame,
+                                     text,
+                                     "What is this?",
+                                     JOptionPane.WARNING_MESSAGE);
+    }
 }
 
 
index 01646946b0353026bae0719f8c137216c109c15e..91f4ca8cfa0382e373efc938e046ec38cb7e6c81 100644 (file)
 import java.util.*;
 
 public class citReply {
-  public static final int      LISTING_FOLLOWS=100, OK=200, MORE_DATA=300,
-    SEND_LISTING=400, ERROR=500, BINARY_FOLLOWS=600, SEND_BINARY=700,
-    START_CHAT_MODE=800;
-
-  int          res_code;
-  String       line,data;
-  Vector       args, listing;
-  boolean      expressmsg;
-
-  public citReply( String line ) {
-    this.line = line;
-
-    args = new Vector();
-    listing = null;
-    data = null;
-    res_code = ERROR;
-    expressmsg = false;
-
-    if( line != null )
-      parseLine();
-  }
-
-  public void parseLine() {
-    try {
-      res_code = Integer.parseInt( line.substring( 0, 3 ) );
-    } catch( Exception e ) {};
-
-    StringBuffer       s = new StringBuffer();
-
-    if( (line.length() > 3) && (line.charAt( 3 ) == '*') )
-      expressmsg = true;
-
-    for( int i = 4; i < line.length(); i++ ) {
-      char     c = line.charAt( i );
-      if( c == '|' ) {
-       args.addElement( s.toString() );
-       s = new StringBuffer();
-      }
-      else
-       s.append( c );
+    public static final int    LISTING_FOLLOWS=100, OK=200, MORE_DATA=300,
+       SEND_LISTING=400, ERROR=500, BINARY_FOLLOWS=600, SEND_BINARY=700,
+       START_CHAT_MODE=800;
+
+    int                res_code;
+    String     line,data;
+    Vector     args, listing;
+    boolean    expressmsg;
+
+    public citReply( String line ) {
+       this.line = line;
+
+       args = new Vector();
+       listing = null;
+       data = null;
+       res_code = ERROR;
+       expressmsg = false;
+
+       if( line != null )
+           parseLine();
     }
-    if( s.length() != 0 ) args.addElement( s.toString() );
 
-  }
+    public void parseLine() {
+       try {
+           res_code = Integer.parseInt( line.substring( 0, 3 ) );
+       } catch( Exception e ) {};
 
-  public boolean expressMessage() {
-    return expressmsg;
-  }
+       StringBuffer    s = new StringBuffer();
 
-  public boolean listingFollows() {
-    return res_code/100 == LISTING_FOLLOWS/100;
-  }
+       if( (line.length() > 3) && (line.charAt( 3 ) == '*') )
+           expressmsg = true;
 
-  public boolean ok() {
-    return res_code/100 == OK/100;
-  }
+       for( int i = 4; i < line.length(); i++ ) {
+           char        c = line.charAt( i );
+           if( c == '|' ) {
+               args.addElement( s.toString() );
+               s = new StringBuffer();
+           }
+           else
+               s.append( c );
+       }
+       if( s.length() != 0 ) args.addElement( s.toString() );
 
-  public boolean moreData() {
-    return res_code/100 == MORE_DATA/100;
-  }
+    }
+
+    public boolean expressMessage() {
+       return expressmsg;
+    }
 
-  public boolean sendListing() {
-    return res_code/100 == SEND_LISTING/100;
-  }
+    public boolean listingFollows() {
+       return res_code/100 == LISTING_FOLLOWS/100;
+    }
 
-  public boolean error() {
-    return res_code/100 == ERROR/100;
-  }
+    public boolean ok() {
+       return res_code/100 == OK/100;
+    }
 
-  public  boolean binaryFollows() {
-    return res_code/100 == BINARY_FOLLOWS/100;
-  }
+    public boolean moreData() {
+       return res_code/100 == MORE_DATA/100;
+    }
 
-  public boolean sendBinary() {
-    return res_code/100 == SEND_BINARY/100;
-  }
+    public boolean sendListing() {
+       return res_code/100 == SEND_LISTING/100;
+    }
 
-  public boolean startChatMode() {
-    return res_code/100 == START_CHAT_MODE/100;
-  }
+    public boolean error() {
+       return res_code/100 == ERROR/100;
+    }
 
-  public boolean addData( String s ) {
-    if( s.equals( "000" ) )
-      return false;
+    public  boolean binaryFollows() {
+       return res_code/100 == BINARY_FOLLOWS/100;
+    }
 
-    if( listing == null ) listing = new Vector();
-    listing.addElement( s );
-    return true;
-  }
+    public boolean sendBinary() {
+       return res_code/100 == SEND_BINARY/100;
+    }
 
-  public String getLine( int i ) {
-    if( listing == null ) return null;
+    public boolean startChatMode() {
+       return res_code/100 == START_CHAT_MODE/100;
+    }
 
-    if( (i<0) || (i>=listing.size()) ) return null;
+    public boolean addData( String s ) {
+       if( s.equals( "000" ) )
+           return false;
 
-    return (String)listing.elementAt( i );
-  }
+       if( listing == null ) listing = new Vector();
+       listing.addElement( s );
+       return true;
+    }
 
-  public String getData() {
-    if( data != null ) return data;
+    public String getLine( int i ) {
+       if( listing == null ) return null;
 
-    StringBuffer       s = new StringBuffer();
+       if( (i<0) || (i>=listing.size()) ) return null;
 
-    for( Enumeration e=listing.elements(); e.hasMoreElements(); ) {
-      s.append( (String)e.nextElement() );
-      s.append( "\n" );
+       return (String)listing.elementAt( i );
     }
 
-    data = s.toString();
+    public String getData() {
+       if( data != null ) return data;
 
-    return data;
-  }
+       StringBuffer    s = new StringBuffer();
+
+       for( Enumeration e=listing.elements(); e.hasMoreElements(); ) {
+           s.append( (String)e.nextElement() );
+           s.append( "\n" );
+       }
+
+       data = s.toString();
+
+       return data;
+    }
 
-  public String getArg( int i ) {
-    if( args == null ) return "";
+    public String getArg( int i ) {
+       if( args == null ) return "";
 
-    if( (i<0) || (i>=args.size()) ) return "";
+       if( (i<0) || (i>=args.size()) ) return "";
 
-    return (String)args.elementAt( i );
-  } 
+       return (String)args.elementAt( i );
+    
 }
 
index e8c54642e9edd1fc62dbf44538aa473663925bbf..09cb834822bf3a4a7cbfe2a5909f7e08e863b79d 100644 (file)
@@ -88,6 +88,7 @@ public class citadel {
     }
 
     public void lostNetwork( String reason ) {
+       theNet.done = true;
        cg.errMsg( reason );
        cg.showHostBrowser();
     }
@@ -170,7 +171,6 @@ public class citadel {
                      cg.mp.rooms.addToFloor( rm );
                    }
                    
-                   System.out.println( "Going to room: " + rm.name );
                    rm.setNew( false );
 
                    roomInfo    ri = new roomInfo( rm, r );
@@ -188,6 +188,15 @@ public class citadel {
            } } );
     }
 
+    public void zapRoom( final roomInfo ri ) {
+       networkEvent( "FORG " + ri.name, new CallBack() {
+           public void run( citReply r ) {
+               if( r.ok() ) {
+                   enterRoom( rooms.forgotRoom( ri ) );
+                   cg.mp.setFloor( rooms.getFloor() );
+               } } } );
+    }
+
     public void logoff() {
        /* close windows */
        if( rf != null )
index 701f90a12713e70c181e1b7e2291e3f7503ddcb5..dcd1691f648417968f59020461163702c5bdf920 100644 (file)
@@ -25,7 +25,10 @@ public class enterRoomWindow extends JFrame {
        pp.addRight( room = new JTextField(10) );
        room.addActionListener( new ActionListener() {
            public void actionPerformed( ActionEvent e ) {
-               pass.requestFocus();
+               if( pass != null )
+                   pass.requestFocus();
+               else
+                   enterRoom();
            } } );
 
        if( def != null ) {
index 4b6b056c9483be4e18f74b9969483ea45027cfa3..7ffd8e74b73228f5d187c2abdb3fdb7fbe832bc5 100644 (file)
@@ -1,43 +1,43 @@
 import java.util.*;
 
 public class floor {
-  String       name, num;
-  int          number, ref_count;
-  SortedVector rooms;
+    String     name, num;
+    int                number, ref_count;
+    SortedVector       rooms;
 
-  public floor( String l ) {
-    rooms = new SortedVector( new roomCmp() );
+    public floor( String l ) {
+       rooms = new SortedVector( new roomCmp() );
 
-    int        i = l.indexOf( '|' );
-    num = l.substring( 0, i );
-    number = citadel.atoi( num );
+       int     i = l.indexOf( '|' );
+       num = l.substring( 0, i );
+       number = citadel.atoi( num );
 
-    int        j = l.indexOf( '|', ++i );
-    name = l.substring( i, j );
+       int     j = l.indexOf( '|', ++i );
+       name = l.substring( i, j );
 
-    ref_count = citadel.atoi( l.substring( j+1 ) );
+       ref_count = citadel.atoi( l.substring( j+1 ) );
 
-    /*    System.out.println( "floor name: " + name );
-    System.out.println( "number    : " + number );
-    System.out.println( "ref_count : " + ref_count );*/
-  }
+       /*    System.out.println( "floor name: " + name );
+             System.out.println( "number    : " + number );
+             System.out.println( "ref_count : " + ref_count );*/
+    }
 
-  public void addRoom( room r ) {
-    /*    System.out.println( "adding " + r.name() + " to " + name ); */
-    rooms.addElement( r );
-  }
+    public void addRoom( room r ) {
+       /*    System.out.println( "adding " + r.name() + " to " + name ); */
+       rooms.addElement( r );
+    }
 
-  public String num() {
-    return num;
-  }
+    public String num() {
+       return num;
+    }
 
-  public int number() {
-    return number;
-  }
+    public int number() {
+       return number;
+    }
 
-  public String name() {
-    return name;
-  }
+    public String name() {
+       return name;
+    }
 }
 
 
index 53b9cebef686fef89330d2c0c23a8f8b83555a42..edc41fce75401157edc5483a2c8e64ecafb2745f 100644 (file)
@@ -1,4 +1,3 @@
-
 import javax.swing.*;
 import java.awt.*;
 import java.awt.event.*;
@@ -16,8 +15,8 @@ public class mainPanel extends JPanel {
 
        JPanel  p = new JPanel();
        p.setLayout( new BorderLayout() );
-       p.setBorder( BorderFactory.createTitledBorder( 
-                                                     BorderFactory.createEtchedBorder(), "Cmds" ) );
+       /*      p.setBorder( BorderFactory.createTitledBorder( 
+               BorderFactory.createEtchedBorder(), "Cmds" ) ); */
 
        VertPanel       vp = new VertPanel();
        p.add( "Center", vp );
@@ -180,5 +179,3 @@ public class mainPanel extends JPanel {
        }
     }
 }
-
-
index e7d77ba04d2917d2b17d8fccc2f6a905df6113ef..85f012faf2d7eb542ed762d109f7910cf89e70a5 100644 (file)
@@ -23,8 +23,8 @@ public class messagePanel extends JPanel {
        
        JPanel  p = new JPanel();
        p.setLayout( new BorderLayout() );
-       p.setBorder( BorderFactory.createTitledBorder( 
-                 BorderFactory.createEtchedBorder(), "Cmds" ) );
+       /*      p.setBorder( BorderFactory.createTitledBorder( 
+               BorderFactory.createEtchedBorder(), "Cmds" ) ); */
 
        VertPanel       vp = new VertPanel();
        p.add( "Center", vp );
@@ -45,20 +45,18 @@ public class messagePanel extends JPanel {
        vp.add( b = new JButton( "Read Info" ) );
        b.addActionListener( new ActionListener() {
            public void actionPerformed( ActionEvent e ) {
-               //              new roomInfoWindow( ri );
+               new roomInfoWindow( ri );
            } } );
-       b.setEnabled( false );
 
        vp.add( b = new JButton( "Zap Room" ) );
        b.addActionListener( new ActionListener() {
            public void actionPerformed( ActionEvent e ) {
-               System.out.println( "Zap room" );
+               if( JOptionPane.showConfirmDialog( null, "Zap " + ri.name + "?" ) == 0 )
+                   citadel.me.zapRoom( ri );
            } } );
 
-       b.setEnabled( false );
 
-
-       jcb = new JComboBox();
+               jcb = new JComboBox();
        jcb.addItem( "Read New" );
        jcb.addItem( "Read All" );
        jcb.addItem( "Last 5" );
index 9978c133c1936879fa3d40c39b9e72f712057df0..b0bcefdfad18955cc2e2fdf5e163b4068290be1c 100644 (file)
@@ -43,6 +43,8 @@ public class roomFrame extends JFrame {
        setTitle( title );
        cdLayout.show( c, "Messages" );
        mp.refresh( ri );
+       if( ri.info != 0)
+           new roomInfoWindow( ri );
     }
 
     public void showRoom() {
index 1086033319bc0fb5aed137e764a333fed18e9c4d..3811819a9b362230cbc6a98bf07916e89c69290c 100644 (file)
@@ -20,3 +20,6 @@ public class roomInfo {
        floor = citadel.atoi( r.getArg( 10 ) );
     }
 }
+
+
+
index 0d2d7b9cbbca0eea4cb2dd5a39d0f27a99732946..4cbac602caf37138740da332a8f0450a7c7094dc 100644 (file)
 import java.util.*;
 
 public class roomMap {
-  Vector       f_list;
-  Hashtable    floors, rooms;
+    Vector     f_list;
+    Hashtable  floors, rooms;
 
-  floor                cur_floor;
-  mainPanel    mp;
+    floor              cur_floor;
+    mainPanel  mp;
 
-  public roomMap( mainPanel mp ) {
-    f_list = new Vector();
-    floors = new Hashtable();
-    rooms = new Hashtable();
-    this.mp = mp;
-  }
+    public roomMap( mainPanel mp ) {
+       f_list = new Vector();
+       floors = new Hashtable();
+       rooms = new Hashtable();
+       this.mp = mp;
+    }
 
-  public void floors( citReply r ) {
-    int                i = 0;
-    String     line;
+    public void floors( citReply r ) {
+       int             i = 0;
+       String  line;
 
-    floors = new Hashtable();
+       floors = new Hashtable();
     
-    while( (line = r.getLine( i++ ) ) != null ) {
-      floor    f = new floor( line );
-      floors.put( f.num, f );
-      floors.put( f.name, f );
-      f_list.addElement( f );
+       while( (line = r.getLine( i++ ) ) != null ) {
+           floor       f = new floor( line );
+           floors.put( f.num, f );
+           floors.put( f.name, f );
+           f_list.addElement( f );
+       }
     }
-  }
-
-  public void new_rooms( citReply rep ) {
-    int                i = 0;
-    String     line;
-
-    while( (line = rep.getLine( i++ ) ) != null ) {
-      room     r, rr = new room( line );
-      r = (room)rooms.get( rr.name() );
-      if( r == null ) {
-       rr.setNew();
-       rooms.put( rr.name, rr );
-       addToFloor( rr );
-      } else 
-       r.setNew();
+
+    public void new_rooms( citReply rep ) {
+       int             i = 0;
+       String  line;
+
+       while( (line = rep.getLine( i++ ) ) != null ) {
+           room        r, rr = new room( line );
+           r = (room)rooms.get( rr.name() );
+           if( r == null ) {
+               rr.setNew();
+               rooms.put( rr.name, rr );
+               addToFloor( rr );
+           } else 
+               r.setNew();
+       }
     }
-  }
 
-  public void old_rooms( citReply rep ) {
-    int                i = 0;
-    String     line;
+    public void old_rooms( citReply rep ) {
+       int             i = 0;
+       String  line;
 
-    while( (line = rep.getLine( i++ )) != null ) {
-      room     r = new room( line );
-      rooms.put( r.name(), r );
-      addToFloor( r );
+       while( (line = rep.getLine( i++ )) != null ) {
+           room        r = new room( line );
+           rooms.put( r.name(), r );
+           addToFloor( r );
+       }
     }
-  }
-
-  public void addToFloor( room r ) {
-    floor      f = (floor)floors.get( r.fname );
-    if( f != null )
-      f.addRoom( r );
-  }
-
-  public floor nextFloor() {
-    int        c = f_list.indexOf( cur_floor );
-    c++;
-
-    try {
-      cur_floor = (floor)f_list.elementAt( c );
-    } catch( Exception e ) {
-      cur_floor = (floor)f_list.firstElement();
+
+    public void addToFloor( room r ) {
+       floor   f = (floor)floors.get( r.fname );
+       if( f != null )
+           f.addRoom( r );
     }
 
-    setFloor( cur_floor );
-    return cur_floor;
-  }
+    public floor nextFloor() {
+       int     c = f_list.indexOf( cur_floor );
+       c++;
+
+       try {
+           cur_floor = (floor)f_list.elementAt( c );
+       } catch( Exception e ) {
+           cur_floor = (floor)f_list.firstElement();
+       }
+
+       setFloor( cur_floor );
+       return cur_floor;
+    }
     
-  public floor getFloor() {
-    if( cur_floor == null ) cur_floor = (floor)f_list.firstElement();
-
-    return cur_floor;
-  }
-
-  public floor getFloor( String name ) {
-    return (floor)floors.get( name );
-  }
-
-  public floor getFloor( room rm ) {
-    return getFloor( rm.fname );
-  }
-
-  public void setFloor( floor f ) {
-    cur_floor = f;
-    mp.setFloor( f );
-    mp.updateLists( f.name() );
-  }
-
-  public room nextNewRoom() {
-    floor      c = getFloor();
-
-    do {
-      for( Enumeration e = getFloor().rooms.elements(); e.hasMoreElements(); ) {
-       room    r = (room)e.nextElement();
-       if( r.hasNew() ) return r;
-      }
-      nextFloor();
-    } while( c != getFloor() );
-
-    System.out.println( "No more new rooms... refreshing list" );
-
-    citadel.me.networkEvent( "LKRN", new CallBack() {
-      public void run( citReply r ) {
-       new_rooms( r );
-       room    rm = getRoom( "Lobby" );
-       setFloor( getFloor( rm ) );
+    public floor getFloor() {
+       if( cur_floor == null ) cur_floor = (floor)f_list.firstElement();
+
+       return cur_floor;
+    }
+
+    public floor getFloor( String name ) {
+       return (floor)floors.get( name );
+    }
+
+    public floor getFloor( room rm ) {
+       return getFloor( rm.fname );
+    }
+
+    public void setFloor( floor f ) {
+       cur_floor = f;
+       mp.setFloor( f );
+       mp.updateLists( f.name() );
+    }
+
+    public room nextNewRoom() {
+       floor   c = getFloor();
+
+       do {
+           for( Enumeration e = getFloor().rooms.elements(); e.hasMoreElements(); ) {
+               room    r = (room)e.nextElement();
+               if( r.hasNew() ) return r;
+           }
+           nextFloor();
+       } while( c != getFloor() );
+
+       System.out.println( "No more new rooms... refreshing list" );
+
+       citadel.me.networkEvent( "LKRN", new CallBack() {
+           public void run( citReply r ) {
+               new_rooms( r );
+               room    rm = getRoom( "Lobby" );
+               setFloor( getFloor( rm ) );
        
-      } } );
+           } } );
+
+       room    r = getRoom( "Lobby" );
+       setFloor( getFloor( r ) );
 
-    room       r = getRoom( "Lobby" );
-    setFloor( getFloor( r ) );
+       return r;
+    }
 
-    return r;
-  }
+    public room getRoom( String name ) {
+       return (room)rooms.get(name);
+    }
 
-  public room getRoom( String name ) {
-    return (room)rooms.get(name);
-  }
+    public room forgotRoom( roomInfo ri ) {
+       room    r = (room)rooms.remove( ri.name );
+       if( r == null ) return nextNewRoom();
+       floor   f = getFloor( ri.rm );
+       if( f == null ) return nextNewRoom();
+       f.rooms.removeElement( ri.rm );
+       return nextNewRoom();
+    }
     
 }
 
 
+
+
+