tests: add tests for multi-iterators
[nit.git] / examples / leapfrog / leapfrog.nit
index f666b89..6aa6f48 100644 (file)
@@ -17,7 +17,7 @@
 # This module is an example of a simple game using a curses backend
 module leapfrog
 
-import game
+import scene2d
 
 # A falling apple
 # If the sheep grab it, it scores one point.
@@ -34,7 +34,7 @@ class Animal
        # The value indicate the number of step that remain to be stunt
        #
        # If a animal is stunned, it cannot move horizontally
-       var stunt_ttl: Int writable = 0
+       var stunt_ttl: Int = 0 is writable
 
        # Common update for animal
        # handle stunt and edge collision
@@ -116,8 +116,8 @@ class Duck
        end
 end
 
-class Scene
-       super LiveObject
+class PlayScene
+       super Scene
 
        var apples = new LiveGroup[Apple]
        var duck = new Duck