public class Wall implements MapSite
1:
2: package maze;
3:
4: import java.awt.*;
5: import java.applet.AudioClip;
6:
7: public class Wall implements MapSite {
8:
9: public static final Color WALL_COLOR = Color.orange;
10:
11: public Object clone() throws CloneNotSupportedException {
12: return super.clone();
13: }
14:
15: public void enter(Maze maze) {
16: hurts.play();
17: }
18:
19: public void draw(Graphics g, int x, int y, int w, int h) {
20: g.setColor(WALL_COLOR);
21: g.fillRect(x, y, w, h);
22: }
23:
24: protected static AudioClip hurts = util.AudioUtility.getAudioClip("audio/that.hurts.au");
25:
26: }