/ld26

To get this branch, use:
bzr branch http://9ix.org/bzr/ld26

« back to all changes in this revision

Viewing changes to svg_levels.py

  • Committer: Josh C
  • Date: 2013-04-29 01:54:19 UTC
  • Revision ID: josh@9ix.org-20130429015419-8ts0gwspqonsxkjb
Tags: compo
nameĀ theĀ game

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
},
141
141
""" % (x,y,w,h)
142
142
 
 
143
    sel = CSSSelector('svg|rect[ink|label="boat"]', ns)
 
144
    for e in sel(t):
 
145
        x, y = float(e.get('x')), float(e.get('y'))
 
146
        #w, h = float(e.get('width')), float(e.get('height'))
 
147
 
 
148
        print """
 
149
Boat:new{
 
150
  x = %f, y = %f,
 
151
},
 
152
""" % (x,y)
 
153
 
143
154
    sel = CSSSelector('svg|rect[ink|label="troll"]', ns)
144
155
    for e in sel(t):
145
156
        x, y = float(e.get('x')), float(e.get('y'))