On 29 Dec 2000 22:26:22 -0600, Dave Thomas wrote: > I guess I was wondering how you used all these 26 variables. well the 'planet' object, in terms of the game, contains variables, methods to manipulate that object. a.x is the x coord a.y is the y coord another object in the code will be 'fleet' object. ideally this will contain information like the number of ships travelling from one planet to the next. it will also contain origin and destination coord's (as above), so: org_x=a.x org_y=a.y dest_x=z.x dest_y=z.y > code has specific planets hard-wired in at certain places, the only variables that are hardwired are the coordinates, ship production, name). they're first assigned values when the planet object is initialized (so i have 26 objects to initilize, those init methods are called only once) > But do you ever do things like iterate over them, or access them by name? i will have to iterate over them. each planet has a ship production value. so the number of ships is going increase every year. for every planet i'll need: a.ships =a.ships + a.production and i need that 26 times. you can see why i'm looking for a solution. i'll also have up to 25 fleets at a time, and a variable such as: fleet1.distance, will be decremented each turn... i started off using C on the palmpilot, ported it to tcl/tk for a windows version, and recently started a python port... so far with each port, i've made the code a little cleaner trying to take advantage of what each language has to offer. > Without knowing your application, this is obviously just idle > speculation at the url below (the 'GEB' link when you get there) it has (older) screen shots but the latest version of the pilot and windows version are there. it's actually a re-write of an old c64 game. -- *---------------------------------------- | |http://www.biosys.net/snowzone | |remove myspleen to email | *-----------------------