old-java-games

java games my brother and I developed as kids.
Log | Files | Refs | README

FirstRoom.java (866B)


      1 public class FirstRoom implements CaveInterface {
      2     CaveGame myParent;
      3     CaveArea myArea;
      4 
      5     public FirstRoom(CaveGame parent, CaveArea area) {
      6         myParent = parent;
      7         myArea = area;
      8     }
      9 
     10     public void display() {
     11         myArea.currentImage = myArea.firstRoom;
     12         /*
     13          * if (myArea.currentMusic != null) myArea.currentMusic.stop();
     14          * myArea.currentMusic = myArea.ACfirstRoom; if (myArea.currentMusic != null)
     15          * myArea.currentMusic.loop();
     16          */
     17         System.out.println("Just Inside the Entrance");
     18         myArea.repaint();
     19     }
     20 
     21     public CaveInterface processA() {
     22         return new LeftDoor(myParent, myArea);
     23     }
     24 
     25     public CaveInterface processB() {
     26         return new River(myParent, myArea);
     27     }
     28 
     29     public CaveInterface processC() {
     30         return new FirstCave(myParent, myArea);
     31     }
     32 }