Mercurial > eagle-eye
comparison pyikriam/example.py @ 174:0cfc7a19a4d2
branch merged
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Sun, 02 Nov 2008 04:12:23 +0800 |
parents | 8f699a9da6c0 |
children | 3ba3edda6d1e |
comparison
equal
deleted
inserted
replaced
173:e8a244ce5a1d | 174:0cfc7a19a4d2 |
---|---|
1 import sys | 1 import sys |
2 from __init__ import Ikariam | 2 from ikariam import Ikariam |
3 | 3 |
4 if len(sys.argv) != 2: | 4 if len(sys.argv) != 2: |
5 print >> sys.stderr, 'Usage: %s <city id>' % (sys.argv[0]) | 5 print >> sys.stderr, 'Usage: %s <city id>' % (sys.argv[0]) |
6 sys.exit(1) | 6 sys.exit(1) |
7 pass | 7 pass |
21 print 'marble is ' + city.marble | 21 print 'marble is ' + city.marble |
22 print 'crystal is ' + city.crystal | 22 print 'crystal is ' + city.crystal |
23 print 'sulfur is ' + city.sulfur | 23 print 'sulfur is ' + city.sulfur |
24 print 'positions ' + repr(city.positions) | 24 print 'positions ' + repr(city.positions) |
25 | 25 |
26 city.positions[0].sync() | |
27 print 'positions[0] level is ' + str(city.positions[0].level) |