old-java-games

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

HotRoom.java (848B)


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