Game - Map data structures

Pierre-Frédéric Caillaud peufeu at free.fr
Fri Jun 18 16:58:45 EDT 2004


	Save memory by having all the water tiles pointing to the same water  
instance.

water = WaterTile()

... build your tiles :

if tile should be water:
	tile[x][y] = water			# doesn't instanciate
else:
	tile[x][y] = GroundTile()		# instanciate new object



More information about the Python-list mailing list