summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTinnet Coronam <tinnet@coronam.net>2012-10-17 01:43:24 +0200
committerTinnet Coronam <tinnet@coronam.net>2012-10-17 01:43:24 +0200
commitd24b6a7797c177a9832c6d99c4ac498484287e64 (patch)
treea39f30a75ca4e621e50c6bc2503b6ba9231d9833 /tests
parent02528e23b813468ed1b2489475a706a3ae828d81 (diff)
parentd2b65a6a1bd4093f64c43c92e493b17ef41586ea (diff)
downloadpygments-d24b6a7797c177a9832c6d99c4ac498484287e64.tar.gz
merged upstream into branch
Diffstat (limited to 'tests')
-rw-r--r--tests/examplefiles/example.monkey84
1 files changed, 84 insertions, 0 deletions
diff --git a/tests/examplefiles/example.monkey b/tests/examplefiles/example.monkey
new file mode 100644
index 00000000..5457fc88
--- /dev/null
+++ b/tests/examplefiles/example.monkey
@@ -0,0 +1,84 @@
+Strict
+
+#rem
+this is a
+#rem
+nested
+#end
+comment
+even other preproc keywords are nested within!
+#If TARGET
+#End
+#end
+
+Import mojo
+
+Const ONECONST:Int = 1
+Const TWOCONST := 2
+Const THREECONST := 3, FOURCONST:Int = 4
+
+Class Game Extends App
+
+ ' radial sprial with axis aligned phase
+
+ Function DrawSpiral(clock)
+ Local w=DeviceWidth/2
+ For Local i#=0 Until w*1.5 Step .2
+ Local x#,y#
+ x=w+i*Sin(i*3+clock)
+ y=w+i*Cos(i*2+clock)
+ DrawRect x,y,1,1
+ Next
+ hitbox.Collide(event.pos)
+ End
+
+ Field updateCount
+
+ Method OnCreate()
+ Print "spiral"
+
+ SetUpdateRate 60
+ End
+
+ Method OnUpdate()
+ updateCount+=1
+ End
+
+ Method OnRender()
+ Cls
+ DrawSpiral updateCount
+ DrawSpiral updateCount*1.1
+ End
+
+End
+
+Class Enemy
+ Method Die () Abstract
+End
+
+Class Hoodlum Extends Enemy
+ Local currentNode:list.Node<Vector2D>
+
+ ' Must implement Die method...
+
+ Method Die ()
+ Print "B'oss, he-- he killed me, b'oss!"
+ End
+
+End
+
+Class VectorNode Extends Node<Vector2D>
+End
+
+Interface Computer
+ Method Boot ()
+ Method Process ()
+ Method Display ()
+End
+
+Class PC Implements Computer
+End
+
+Function Main()
+ New Game()
+End