comparison gamelib/buildings.py @ 177:b400991ccce1

pedantic building renaming
author Adrianna Pińska <adrianna.pinska@gmail.com>
date Thu, 03 Sep 2009 23:23:45 +0000
parents 92d11e0544bc
children 355eaae40b1f
comparison
equal deleted inserted replaced
176:0d4e28330da5 177:b400991ccce1
180 BUY_PRICE = 100 180 BUY_PRICE = 100
181 SELL_PRICE = 90 181 SELL_PRICE = 90
182 SIZE = (3, 2) 182 SIZE = (3, 2)
183 IMAGE = 'sprites/henhouse.png' 183 IMAGE = 'sprites/henhouse.png'
184 SELECTED_IMAGE = 'sprites/select_henhouse.png' 184 SELECTED_IMAGE = 'sprites/select_henhouse.png'
185 NAME = 'Hen House' 185 NAME = 'Henhouse'
186 FLOORS = 1 186 FLOORS = 1
187 187
188 class DoubleStoryHenHouse(HenHouse): 188 class DoubleStoryHenHouse(HenHouse):
189 """A double story hen house.""" 189 """A double story hen house."""
190 TILE_NO = tiles.REVERSE_TILE_MAP['hendominium'] 190 TILE_NO = tiles.REVERSE_TILE_MAP['hendominium']
203 BUY_PRICE = 200 203 BUY_PRICE = 200
204 SELL_PRICE = 150 204 SELL_PRICE = 150
205 SIZE = (2, 2) 205 SIZE = (2, 2)
206 IMAGE = 'sprites/watchtower.png' 206 IMAGE = 'sprites/watchtower.png'
207 SELECTED_IMAGE = 'sprites/select_watchtower.png' 207 SELECTED_IMAGE = 'sprites/select_watchtower.png'
208 NAME = 'Watch Tower' 208 NAME = 'Watchtower'
209 FLOORS = 1 209 FLOORS = 1
210 210
211 def is_building(obj): 211 def is_building(obj):
212 """Return true if obj is a build class.""" 212 """Return true if obj is a build class."""
213 return getattr(obj, "IS_BUILDING", False) and hasattr(obj, "NAME") 213 return getattr(obj, "IS_BUILDING", False) and hasattr(obj, "NAME")