示例#1
0
文件: World.cs 项目: tpcmurray/toge
        public World()
        {
            Locations = new Dictionary<string, Location>(StringComparer.InvariantCultureIgnoreCase);
            ItemStore = new Items();
            Actions = new List<Action>();
            Player = new Player();
            IsEnded = false;

            Actions.Add(new Action("N", "NORTH"));
            Actions.Add(new Action("S", "SOUTH"));
            Actions.Add(new Action("E", "EAST"));
            Actions.Add(new Action("W", "WEST"));
            Actions.Add(new Action("L", "either 'LOOK' or 'LOOK item'"));
            Actions.Add(new Action("P", "PICKUP item"));
            Actions.Add(new Action("D", "DROP item"));
            Actions.Add(new Action("I", "INVENTORY"));
            Actions.Add(new Action("U", "either 'USE item' or 'USE item1 ON item2'"));
        }
示例#2
0
 public Location()
 {
     Items = new Items();
 }
示例#3
0
文件: Player.cs 项目: tpcmurray/toge
 public Player()
 {
     Inventory = new Items();
 }