old-java-games

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

LeftDoor.java (855B)


      1 public class LeftDoor implements CaveInterface {
      2     CaveGame myParent;
      3     CaveArea myArea;
      4 
      5     public LeftDoor(CaveGame parent, CaveArea area) {
      6         myParent = parent;
      7         myArea = area;
      8     }
      9 
     10     public void display() {
     11         myArea.currentImage = myArea.leftDoor;
     12         /*
     13          * if (myArea.currentMusic != null) myArea.currentMusic.stop();
     14          * myArea.currentMusic = myArea.ACleftDoor; if (myArea.currentMusic != null)
     15          * myArea.currentMusic.loop();
     16          */
     17         System.out.println("Through the Left Door");
     18         myArea.repaint();
     19     }
     20 
     21     public CaveInterface processA() {
     22         // do nothing
     23         return (this);
     24     }
     25 
     26     public CaveInterface processB() {
     27         // do nothing
     28         return (this);
     29     }
     30 
     31     public CaveInterface processC() {
     32         // do nothing
     33         return (this);
     34     }
     35 }