home *** CD-ROM | disk | FTP | other *** search
- using System;
-
- namespace wombat
- {
- /// <summary>
- /// The Adventure class contains the 'world' of the game:
- /// the player and any other actors, plus the map.
- /// </summary>
- public class Adventure
- {
- private Actor _player;
- private RoomList _map = new RoomList();
-
-
- public Adventure()
- {
- //
- // FOR NOW any adventure object is always an instance of the same game
- // Later we can change this so that different games can be loaded
- //
-
- ThingList potlist = new ThingList();
- potlist.Add(new Thing("Jewel", "A lovely diamond"));
- potlist.Add(new Thing("Ring", "A ring of power."));
-
- ThingList rm4list = new ThingList();
- rm4list.Add(new Thing("Thing one","1st thing"));
- rm4list.Add(new Thing("Thing two","2nd thing"));
- rm4list.Add(new Thing("Thing three","3rd thing"));
- rm4list.Add(new ThingHolder("a pot", "a brass container.", potlist));
-
- _map.Add(new Room("room0", "A field west of a white house.", dir.NOEXIT, 2, dir.NOEXIT, 1, new ThingList()));
- _map.Add(new Room("room1", "A lovely white house.", dir.NOEXIT, dir.NOEXIT, 0, dir.NOEXIT, new ThingList()));
- _map.Add(new Room("room2", "A golden room hung with rich tapestries.", 0, 4, dir.NOEXIT, 3, new ThingList()));
- _map.Add(new Room("room3", "A nasty dungeon.", dir.NOEXIT, 5, 2, dir.NOEXIT, new ThingList()));
- _map.Add(new Room("room4", "A dark cave.", 2, dir.NOEXIT, dir.NOEXIT, 5, rm4list));
- _map.Add(new Room("room5", "A sweetly scented orchard.", 3, dir.NOEXIT, 4, dir.NOEXIT, new ThingList()));
-
-
-
- //!!! ---- add things to some rooms!!!!
- _player = new Actor("You","The Player", _map.Item(3), new ThingList());
-
-
-
-
- }
-
- public Actor Player
- {
- get
- {
- return _player;
- }
- set
- {
- _player = value;
- }
- } // Player
-
- public RoomList Map
- {
- get
- {
- return _map;
- }
- set
- {
- _map = value;
- }
- } // Map
-
- } // Adventure
- }
-