On Thu, Feb 21, 2008 at 7:32 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > > Other beginning programers shouldn't have any problems using > > these routines. > > As long as they use the same number of rooms and entrance and exit > rooms, or they know the places to make the magic edits... > > Kent >
Well, no one was able to suggest anything that worked 100% of the time before. No one. One routine allots the treasure, The other routine allots the monsters. Each routine does one thing, and does it well (100%). It's a text adventure game. It has its own framework. What? You show me what you're talking about, and I'll run it through my test script. Your 'clarity' solution should be easily dropped in to replace the two routines that already work 100% of the time already. Python please. The reorganization should be for 'clarity' (a Noob should be able to understand it, and port it easily to other games that have more or less rooms [will they have to make any magic edits anywhere]. Oh, and these clarity routines should be shorter (in length?). > Good. However they are longer than necessary. Did I cover all the things needed? Wait! No duplications... and something about the random numbers and selection in the same place? I really don't understand that (yet). The table is directly related to the map of the game. In the old games, the monsters and treasures are all in the last column. In the new game, there are two colums, one for monsters, and the other for treasure. In the treasure column, numbers 4-18 are distributed randomly to 43 rooms, minus the entrance, exit, and a 'death' room, and not overwriting numbers 1-3 which are 'hard-wired' to certain rooms. These numbers reference lists of treasure names. Likewise, the monster column gets numbers 1-15 distributed randomly, except for the entrance, exit and 'death' room. These numbers are also references to list elements. I wrote the new routines for the new 43-room game. They work 100% of the time. With minor modifications, they dropped right into the old games. If I make another new game, with different entrance, exit, or other special rooms, these routines should drop right in and with minor modifications, just work. This is the 'framework' for these programs. 8^D Happy Programming! -- b h a a l u u at g m a i l dot c o m "You assist an evil system most effectively by obeying its orders and decrees. An evil system never deserves such allegiance. Allegiance to it means partaking of the evil. A good person will resist an evil system with his or her whole soul." [Mahatma Gandhi] _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor