From: Thufir Date: 2008-02-22T17:52:16+09:00 Subject: Re: Beginner help - txt dungeon On Thu, 21 Feb 2008 06:41:54 +0900, Huw Collingbourne wrote: > This has some attractions of readability (names not numbers) but I'm not > really convinced it is more practical than a simple indexed array. The > secret is to draw out a map on a sheet of paper first, give all the > rooms numbers, draw lines showing the exits and then create the array > with all the correct numbers as attributes to show which room number is > in which direction. Well, just thinking aloud: There may be different worlds/planets dimensions in the game. So that maybe you might have (forgive my poor ruby syntax pls): class earthRoom < room def special_earth_method end end and then a marsRoom class, etc? You wouldn't want to be able to go from an earthRoom to marsRoom under normal circumstances, I expect. Also, some rooms might have north, south, east, west but other rooms might have no directions, but perhaps a secret door, or "pull candlestick" or "go out" or similar. While the intention at this stage is to get something workable, I, for one, would like to know how to keep options open down the road (without overly complicating what's meant to be an exercise). -Thufir