예제 #1
0
파일: room.cs 프로젝트: folshost/Text_Adv
 public void addfrom(string r, string n, Direction to)
 {
     room newroom = new room(r,n);
     newroom.name = n;
     newroom.adjacentRooms[(Direction)(((int)to + 2)%4)] = this;
     this.adjacentRooms[to] = newroom;
 }
예제 #2
0
 static public void move(Direction dir)
 {
     location = location.adjacentRooms[dir];
     Console.WriteLine("You go " + dir + " to the " + location.name + "\n");
 }