Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. namespace museum2
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10.  
  11.  
  12. List<Room> rooms = new List<Room>();
  13. rooms.Add(new Room("Entrance"));
  14. rooms.Add(new Room("Hallway"));
  15. rooms.Add(new Room("Green Room"));
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. //Artwork monaLisa = new Artwork("Mona Lisa", "famous painting", "DaVinci");
  28.  
  29. // connect neighboring room to entrence
  30.  
  31.  
  32. // Green room
  33.  
  34. // Green room artwork
  35.  
  36.  
  37. // Red room
  38.  
  39. // Purple room
  40.  
  41.  
  42.  
  43. // Blue room
  44.  
  45. // Black room
  46.  
  47.  
  48. //Room currentRoom = entrance;
  49.  
  50. //while (true)
  51. //{
  52. // Console.WriteLine("You are in:" + currentRoom.getName());
  53. // currentRoom.printArtworks();
  54.  
  55. // Room roomUp = currentRoom.getRoomUp();
  56. // Room roomRight = currentRoom.getRoomRight();
  57. // Room roomDown = currentRoom.getRoomDown();
  58. // Room roomLeft = currentRoom.getRoomLeft();
  59.  
  60. // if (roomUp != null)
  61. // {
  62. // Console.WriteLine(roomUp.getName() + "is up, write \"f\" to get there.");
  63. // }
  64.  
  65. // if (roomRight != null)
  66. // {
  67. // Console.WriteLine(roomRight.getName() + " is to the right, write \"r\" to get there.");
  68. // }
  69.  
  70. // if (roomDown != null)
  71. // {
  72. // Console.WriteLine(roomDown.getName() + " is downward, write \"d\" to get there.");
  73. // }
  74.  
  75. // if (roomLeft != null)
  76. // {
  77. // Console.WriteLine(roomLeft.getName() + " is to the left, write \"l\" to get there.");
  78. // }
  79.  
  80. // Console.Write("write which direction you want to go: ");
  81. // string answer = Console.ReadLine();
  82. // switch (answer)
  83. // {
  84. // case "f":
  85. // if (roomUp != null)
  86. // {
  87. // currentRoom = roomUp;
  88. // }
  89. // else
  90. // {
  91. // Console.WriteLine("There is no room above.");
  92. // }
  93. // break;
  94. // case "r":
  95. // if (roomRight != null)
  96. // {
  97. // currentRoom = roomRight;
  98. // }
  99. // else
  100. // {
  101. // Console.WriteLine("There is no room on the right.");
  102. // }
  103. // break;
  104.  
  105. // case "d":
  106. // if (roomDown != null)
  107. // {
  108. // currentRoom = roomDown;
  109. // }
  110. // else
  111. // {
  112. // Console.WriteLine("There is no room below.");
  113. // }
  114. // break;
  115. // case "l":
  116. // if (roomLeft != null)
  117. // {
  118. // currentRoom = roomLeft;
  119. // }
  120. // else
  121. // {
  122. // Console.WriteLine("There is no room on the left.");
  123. // }
  124. // break;
  125. // }
  126. // Console.WriteLine();
  127.  
  128.  
  129.  
  130.  
  131. }
  132.  
  133.  
  134. }
  135. }
  136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement