examples/moles: avoid tapping the moles in the back first
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 9 Aug 2015 15:00:05 +0000 (11:00 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 12 Aug 2015 18:42:12 +0000 (14:42 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

examples/mnit_moles/src/moles.nit

index 078d1b4..ae148c4 100644 (file)
@@ -245,7 +245,7 @@ class Screen
        fun input(event: InputEvent): Bool
        do
                if event isa PointerEvent then
-                       for hole in game.holes do
+                       for hole in game.holes.reverse_iterator do
                                if hole.intercepts(event) then
                                        var hole_content = hole.content
                                        if hole_content != null then hole_content.hit(game, hole, event)