Stricter PEP-8 conformance.
[python-bulletml.git] / examples / popcorn / towards.xml
index da70f59..58ad5fb 100644 (file)
@@ -1,8 +1,17 @@
 <?xml version="1.0" ?>\r
 <!DOCTYPE bulletml SYSTEM "http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/bulletml.dtd">\r
 \r
-<bulletml xmlns="http://www.asahi-net.or.jp/~cs8k-cyu/bulletml">\r
+<bulletml xmlns="http://www.asahi-net.or.jp/~cs8k-cyu/bulletml"\r
+         xmlns:py="http://code.google.com/p/python-bulletml/">\r
   <action label="top">\r
-    <fire><bullet/></fire>\r
+    <py:if><py:cond>$rand > 0.7</py:cond>\r
+      <py:then><fire><bullet/><py:appearance>red</py:appearance></fire></py:then>\r
+      <py:else>\r
+       <py:if><py:cond>$rand > 0.5</py:cond>\r
+         <py:then><fire><bullet/><py:appearance>blue</py:appearance></fire></py:then>\r
+         <py:else><fire><bullet/><py:appearance>green</py:appearance></fire></py:else>\r
+       </py:if>\r
+      </py:else>\r
+    </py:if>\r
   </action>\r
 </bulletml>\r