public ArnosOrt() { name = "Colony of the Mouse-People"; bezug = "in"; beschrieb = "You don't know how you got here, or how much time has passed."; beschrieb += "Strange creatures stare at you, their faces a cruel amalgamation "; beschrieb += "of human and rodent features."; beschrieb += "They don't seem to like strangers. "; beschrieb += "What appears to be the one in charge, maybe their king, steps forth. "; beschrieb += "He tells you that every citizen of the colony of the mouse-people "; beschrieb += "has suffered the same fate as you and allows you to stay. "; beschrieb += "The citizens are distant, but soon you will be like them. "; beschrieb += "There is no escape. "; beschrieb += "... "; beschrieb += "But what is that? "; beschrieb += "A magic mind-erasing mindray that nobody else has even thought of using? "; beschrieb += "Maybe you can unread the book? "; beschrieb += "You can also spot a strange book on the other side of the room. "; beschrieb += "Maybe you can exit this world the same way you've entered it. "; //Eine Gedächtnis-löschende Waffe, "mindray", benutze mit "take", "use" //Ein weiteres Buch mit einer Maus, "mouse-book", benutze mit "take", "read" //Befehle, um nichts zu machen, "stay" und "sleep" Ding mindray = new Ding("mindray"); this.VerknuepfeDing(mindray); //DingMousebook mousebook = new DingMousebook ("mousebook"); //this.VerknuepfeDing( mousebook ); }
public NicolesOrt() { name = "dining room"; beschrieb = "An old chandelier coveres the dining room in dull candlelight. "; beschrieb += "The huge table is laid for twelve people, but the plates are empty. "; beschrieb += "You can feel a cold draught coming from the end of the room, where claret "; beschrieb += "draperies hide a series of tinted windows. "; beschrieb += "On the right side of the room you see a long case clock. It's pendulum "; beschrieb += "is standing still. "; //beschrieb += "West to you a small door leads to the kitchen. South to you lies the lobby. "; //Dinge im Raum Ding pendulum = new Ding("long case clock with a pendulum"); this.VerknuepfeDing(pendulum); Ding table = new Ding("laid table"); this.VerknuepfeDing(table); Ding scherbe = new Ding("shard"); this.VerknuepfeDing(scherbe); Ding gabel = new Ding("fork"); this.VerknuepfeDing(gabel); }
public StartOrt() { // Setze die Eigenschaften dieses Orts // in den ererbten Instanz Variablen (siehe Klasse Ort) name = "entrance hall"; bezug = "in"; beschrieb = "Welcome to Nakov's Mansion.\n"; beschrieb += "This is the entrance hall of a small but beautiful "; beschrieb += "old mansion with shimmering lanterns and a smooth dark red carpet "; beschrieb += "that muffles all noise from the outside. "; beschrieb += "Somewhere in the rooms there must be an open fire burning since you "; beschrieb += "can smell it's oak wood smoke. You hear several whispers from behind "; beschrieb += "but look to see nothing."; // erzeuge ein neues Standard Ding mit Namen Ding apfel = new Ding("apple"); this.VerknuepfeDing(apfel); Ding ei = new Ding("egg"); this.VerknuepfeDing(ei); // erzeuge ein neues Standard Ding mit dem neuen Konstruktor // ohne speziellen Namen (zum Test) Ding irgendwas = new Ding(); }
public MyriamsOrt() { // Beschreibung was der Spieler in meinem Ort bekommt name = "kitchen"; bezug = "in"; beschrieb = "It seems that this is the kitchen of the house.\n"; beschrieb += "It still smells of the last dinner but there is no food left."; beschrieb += "Only in the middle of the table stands a bowl with 4 red apples in it."; beschrieb += "Everything glares and seems clean."; beschrieb += "You see a dirty knife that is dangerously balancing over the kitchen table. "; beschrieb += "Ping!"; beschrieb += "It fell on the floor and points to a woody old door."; // erzeugt ein neues Standart Ding //Ding apfel = new Ding ("apple"); //this.VerknuepfeDing (apfel); Ding messer = new Ding("knife"); this.VerknuepfeDing(messer); //MyriamsDing apfel = new MyriamsDing (/*"apple"*/); //this.VerknuepfeDing (apfel); // beschrieb += "The woody old door leads you to the pantry.";//South. Speisekammer von Selina // beschrieb += "The old door leads you to the dining room ";//West. Speisesaal von Nicole }
public void BehandleDingKommando(string in_kommando) { // Teile das Kommando auf // Teile an der Leertaste auf String[] kommandoTeile = in_kommando.Split(' '); if (kommandoTeile.Count() < 2) { // keine Zweiwort Satz, also auch kein Ding Kommando Console.WriteLine("-- sorry, kein zweites Wort da"); } else { // Resultat zwei einzelne Strings (können auch mehr sein) String kommandoTeil = kommandoTeile [0]; Console.WriteLine("-- kommandoTeil:" + kommandoTeil); // Nimm den zweiten Teil (... dritten, vierten) String dingName = kommandoTeile [1]; Console.WriteLine("-- dingName:" + dingName); bool identifiziert = false; // Schlaufe durchs Dictionary dinge durch foreach (var dingEintrag in dinge) { // lokalen Variable ding enthält erstes Ding // Namen aus dem Eintrag holen (Key) String name = dingEintrag.Key; // Vergleiche: Zweiter Teil in_kommando if (name == dingName) { // Juchu! Es gibt ein Ding im Dictionary // mit dem gleichen Namen, der im Kommando // benannt wurde Console.WriteLine("-- Juchu, " + name + " ist identifiziert, Kommando weitergeben"); Ding ding = dingEintrag.Value; ding.BehandleKommando(kommandoTeil); identifiziert = true; } } if (identifiziert == false) { // Schlaufe durch, keine Übereinstimmung gefunden Console.WriteLine("-- kein Ding im Dictionary"); } } }
public MarcellosOrt() { name = "hidden book chamber"; bezug = "in"; beschrieb = "You enter a small chamber that is filled up with books to the top. "; beschrieb += "The air is fusty and the dust trickels down as you tap a book."; beschrieb += "As you turn your head to the left, you see a small crack in the wall,"; beschrieb += "but wide enough for a thin body to slip through."; beschrieb += "The only source of light originates from the spine of a book. Self-illuminating, it seems..."; beschrieb += "It's quite far up the bookshelf, you can't reach it."; Ding book = new Ding("book"); this.VerknuepfeDing(book); }
public SelinasOrt() { name = "pantry"; beschrieb = "It's quiet dark in here. "; beschrieb += "Only a small electric bulb "; beschrieb += "is bringing some faint light in the small chamber. "; beschrieb += "In the south is the door to the kitchen. "; beschrieb += "All other walls are covered with shelves which are packed with canned food. "; beschrieb += "You see a rat sneaking around the shelves. "; //Dinge in meinem Raum Ding ravioli = new Ding("canned ravioli"); this.VerknuepfeDing(ravioli); Ding gab = new Ding("crack in the wall"); this.VerknuepfeDing(gab); //Spezial Dinge SelinaDing ratte = new SelinaDing(name); this.VerknuepfeDing(ratte); }
public void VerknuepfeDing(Ding in_ding) { // Speichere das Ding unter seinem Namen im // Dictionary für dinge dinge[in_ding.name] = in_ding; }