diff options
author | Starla Insigna <hatkirby@fourisland.com> | 2009-01-19 16:22:50 -0500 |
---|---|---|
committer | Starla Insigna <hatkirby@fourisland.com> | 2009-01-19 16:22:50 -0500 |
commit | 80fd704e66e98d70e98da977b01568b7813d80e9 (patch) | |
tree | 8ea16d1f3d37a212c42025e3fbc86d1f4c15545f /src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java | |
parent | 69b495c392bffe96dab97306a42466edd4b2474e (diff) | |
download | fourpuzzle-80fd704e66e98d70e98da977b01568b7813d80e9.tar.gz fourpuzzle-80fd704e66e98d70e98da977b01568b7813d80e9.tar.bz2 fourpuzzle-80fd704e66e98d70e98da977b01568b7813d80e9.zip |
Fixed MoveEvent bug
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java')
-rw-r--r-- | src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java index bcc2ed7..b17d7b3 100644 --- a/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/Map.java | |||
@@ -6,9 +6,9 @@ | |||
6 | package com.fourisland.fourpuzzle.gamestate.mapview; | 6 | package com.fourisland.fourpuzzle.gamestate.mapview; |
7 | 7 | ||
8 | import com.fourisland.fourpuzzle.*; | 8 | import com.fourisland.fourpuzzle.*; |
9 | import com.fourisland.fourpuzzle.gamestate.mapview.event.EventList; | ||
9 | import com.fourisland.fourpuzzle.gamestate.mapview.event.LayerEvent; | 10 | import com.fourisland.fourpuzzle.gamestate.mapview.event.LayerEvent; |
10 | import java.awt.Dimension; | 11 | import java.awt.Dimension; |
11 | import java.util.ArrayList; | ||
12 | import java.util.HashMap; | 12 | import java.util.HashMap; |
13 | import java.util.Vector; | 13 | import java.util.Vector; |
14 | 14 | ||
@@ -41,19 +41,18 @@ public abstract class Map { | |||
41 | } | 41 | } |
42 | } | 42 | } |
43 | 43 | ||
44 | private ArrayList<LayerEvent> events = new ArrayList<LayerEvent>(); | 44 | private EventList events = new EventList(); |
45 | public ArrayList<LayerEvent> getEvents() | 45 | public EventList getEvents() |
46 | { | 46 | { |
47 | return events; | 47 | return events; |
48 | } | 48 | } |
49 | public LayerEvent getEvent(String event) | 49 | public LayerEvent getEvent(String event) |
50 | { | 50 | { |
51 | int i=0; | 51 | for (LayerEvent ev : events) |
52 | for (i=0;i<events.size();i++) | ||
53 | { | 52 | { |
54 | if (events.get(i).getLabel().equals(event)) | 53 | if (ev.getLabel().equals(event)) |
55 | { | 54 | { |
56 | return events.get(i); | 55 | return ev; |
57 | } | 56 | } |
58 | } | 57 | } |
59 | 58 | ||