Compare commits
3 Commits
d4db36c418
...
62830e92a6
Author | SHA1 | Date | |
---|---|---|---|
![]() |
62830e92a6 | ||
![]() |
80e9ec9dbc | ||
![]() |
5996c744a2 |
@ -998,11 +998,17 @@ exists or setup the property manually. For example like this:
|
||||
<target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
|
||||
<target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
|
||||
<copyfiles files="${libs.javaee-web-api-7.0.classpath}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
|
||||
<copyfiles files="${file.reference.jackson-annotations-2.9.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
|
||||
<copyfiles files="${file.reference.jackson-core-2.9.9.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
|
||||
<copyfiles files="${file.reference.jackson-databind-2.9.9.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
|
||||
<mkdir dir="${build.web.dir}/META-INF"/>
|
||||
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
|
||||
</target>
|
||||
<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
|
||||
<copyfiles files="${libs.javaee-web-api-7.0.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
|
||||
<copyfiles files="${file.reference.jackson-annotations-2.9.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
|
||||
<copyfiles files="${file.reference.jackson-core-2.9.9.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
|
||||
<copyfiles files="${file.reference.jackson-databind-2.9.9.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
|
||||
</target>
|
||||
<target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
|
||||
<delete dir="${build.web.dir}/WEB-INF/lib"/>
|
||||
|
@ -1,8 +1,8 @@
|
||||
build.xml.data.CRC32=b50c735c
|
||||
build.xml.data.CRC32=20a1ec55
|
||||
build.xml.script.CRC32=2d64e8d1
|
||||
build.xml.stylesheet.CRC32=651128d4@1.77.1.1
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=b50c735c
|
||||
nbproject/build-impl.xml.script.CRC32=74e621b3
|
||||
nbproject/build-impl.xml.data.CRC32=20a1ec55
|
||||
nbproject/build-impl.xml.script.CRC32=b4f5594b
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1
|
||||
|
@ -28,6 +28,9 @@ dist.war=${dist.dir}/${war.name}
|
||||
endorsed.classpath=\
|
||||
${libs.javaee-endorsed-api-7.0.classpath}
|
||||
excludes=
|
||||
file.reference.jackson-annotations-2.9.0.jar=C:\\Users\\Edi\\Desktop\\jackson-annotations-2.9.0.jar
|
||||
file.reference.jackson-core-2.9.9.jar=C:\\Users\\Edi\\Desktop\\jackson-core-2.9.9.jar
|
||||
file.reference.jackson-databind-2.9.9.jar=C:\\Users\\Edi\\Desktop\\jackson-databind-2.9.9.jar
|
||||
includes=**
|
||||
j2ee.compile.on.save=true
|
||||
j2ee.copy.static.files.on.save=true
|
||||
@ -42,7 +45,10 @@ j2ee.platform.wsit.classpath=
|
||||
j2ee.server.type=gfv3ee6
|
||||
jar.compress=false
|
||||
javac.classpath=\
|
||||
${libs.javaee-web-api-7.0.classpath}
|
||||
${libs.javaee-web-api-7.0.classpath}:\
|
||||
${file.reference.jackson-annotations-2.9.0.jar}:\
|
||||
${file.reference.jackson-core-2.9.9.jar}:\
|
||||
${file.reference.jackson-databind-2.9.9.jar}
|
||||
# Space-separated list of extra javac options
|
||||
javac.compilerargs=
|
||||
javac.debug=true
|
||||
|
@ -10,6 +10,18 @@
|
||||
<file>${libs.javaee-web-api-7.0.classpath}</file>
|
||||
<path-in-war>WEB-INF/lib</path-in-war>
|
||||
</library>
|
||||
<library dirs="200">
|
||||
<file>${file.reference.jackson-annotations-2.9.0.jar}</file>
|
||||
<path-in-war>WEB-INF/lib</path-in-war>
|
||||
</library>
|
||||
<library dirs="200">
|
||||
<file>${file.reference.jackson-core-2.9.9.jar}</file>
|
||||
<path-in-war>WEB-INF/lib</path-in-war>
|
||||
</library>
|
||||
<library dirs="200">
|
||||
<file>${file.reference.jackson-databind-2.9.9.jar}</file>
|
||||
<path-in-war>WEB-INF/lib</path-in-war>
|
||||
</library>
|
||||
</web-module-libraries>
|
||||
<web-module-additional-libraries/>
|
||||
<source-roots>
|
||||
|
@ -1,36 +1,49 @@
|
||||
|
||||
import com.fasterxml.jackson.core.JsonEncoding;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import javax.json.stream.JsonGenerationException;
|
||||
|
||||
public class Game {
|
||||
|
||||
private static ArrayList<Room> rooms = new ArrayList<Room>();
|
||||
private static ArrayList<Item> inventory = new ArrayList<Item>();
|
||||
private static ArrayList<String> story = new ArrayList<String>();
|
||||
private static ArrayList<Item> items = new ArrayList<Item>();
|
||||
private static ArrayList<Puzzle> puzzles = new ArrayList<Puzzle>();
|
||||
|
||||
|
||||
private boolean stoppFlag = false;
|
||||
private Map<String, Object> jsonMap = null;
|
||||
private String[] inputArray = null;
|
||||
|
||||
String[] inputArray = null;
|
||||
String itemName = null;
|
||||
String intentName = null;
|
||||
String puzzleName = null;
|
||||
String input = null;
|
||||
Room currentRoom = null;
|
||||
|
||||
Room intro;
|
||||
Room keller;
|
||||
Puzzle durchgang;
|
||||
Puzzle schloss;
|
||||
Puzzle door;
|
||||
Item schluessel;
|
||||
Item stahlschluessel;
|
||||
private String itemName = null;
|
||||
private String intentName = null;
|
||||
private String puzzleName = null;
|
||||
private String input = null;
|
||||
private Room currentRoom = null;
|
||||
|
||||
public Game() {
|
||||
|
||||
try {
|
||||
startGame();
|
||||
} catch (Exception ex) {
|
||||
@ -38,73 +51,176 @@ public class Game {
|
||||
}
|
||||
}
|
||||
|
||||
public void setVariables() {
|
||||
public Map<String, Object> readJSON() throws IOException, Exception {
|
||||
|
||||
// Intro Raum
|
||||
intro = new Room("Intro");
|
||||
intro.setDescription("Hier ist das Intro von Kidnappd");
|
||||
durchgang = new Puzzle("Durchgang");
|
||||
durchgang.setSolvedText("Hurra, du hast das Intro Level beendet");
|
||||
intro.puzzles.add(durchgang);
|
||||
//TODO: Define path!
|
||||
File file = new File("game.JSON");
|
||||
if(!file.exists())
|
||||
{
|
||||
PrintWriter writer = new PrintWriter("game.JSON", "UTF-8");
|
||||
writer.println("{\\nroom\\n:[{\\nid\\n:0,\\nname\\n:\\nIntro\\n,\\ndescription\\n:\\nHier ist das Intro von Kidnappd\\n,\\ngameoverFlag\\n:false,\\nitems\\n:[],\\npuzzles\\n:[0]},{\\nid\\n:1,\\nname\\n:\\nKeller\\n,\\ndescription\\n:\\nder kleine Mondschein, der zuvor den unbekannten Raum schwach beleuchtet hat, leuchtet viel gr��er und viel heller und du erkennst nun den gesamten Raum. Er ist klein und d�ster. überall h�ngen Spinnennetze und Staub sammelt sich am Betonboden. Du erkennst am anderen Ende des Raumes eine T�r\\n,\\ngameoverFlag\\n:false,\\nitems\\n:[0,1],\\npuzzles\\n:[1,2]}],\\npuzzle\\n:[{\\nid\\n:0,\\nname\\n:\\nDurchgang\\n,\\nitems\\n:[],\\ndescription\\n:\\nAusgang Intro Level\\n,\\nsolved\\n:false,\\nsolvedText\\n:\\nHurra, du hast es geschafft\\n,\\ngameOverFlag\\n:false,\\nnextRoom\\n:null,\\ndependencyText\\n:null,\\ndependency\\n:null},{\\nid\\n:1,\\nname\\n:\\nTuer\\n,\\nitems\\n:[1],\\ndescription\\n:\\nAusgang aus dem Keller\\n,\\nsolved\\n:false,\\nsolvedText\\n:\\nGeschafft! Die Tuer ist offen. Das Intro ist nun beendet\\n,\\ngameOverFlag\\n:true,\\nnextRoom\\n:null,\\ndependencyText\\n:null,\\ndependency\\n:null},{\\nid\\n:2,\\nname\\n:\\nSchloss\\n,\\nitems\\n:[0],\\ndescription\\n:\\nEs ist ein altes Schloss aus Metall, dass eine Einkerbung f�r einen Schl�ssel hat\\n,\\nsolved\\n:false,\\nsolvedText\\n:\\nJa, es hat funktioniert! Mit einem Knacksen geht das Schloss auf und du kannst dich von deiner Beinfessel befreien. \\n,\\ngameOverFlag\\n:false,\\nnextRoom\\n:null,\\ndependencyText\\n:null,\\ndependency\\n:null}],\\nitem\\n:[{\\nid\\n:1,\\nname\\n:\\nStahlschluessel\\n,\\nportableFlag\\n:true,\\nhiddenFlag\\n:false,\\ndescription\\n:\\nEin Stahlschlüssel\\n},{\\nid\\n:0,\\nname\\n:\\nSchluessel\\n,\\nportableFlag\\n:true,\\nhiddenFlag\\n:false,\\ndescription\\n:\\nDer Schlüssel ist kalt und klein. Vielleicht hast du Glück und er passt ins Schloss. Versuche es zu öffnen!\\n}],\\nstory\\n:[\\nDein ganzer K�rper schmerzt, du liegst auf Betonboden. Du f�ngst laut an zu husten und Staubklumpen fliegen aus deinem Mund. Du �ffnest langsam und nur schwer die Augen, doch es ist fast gar nichts zu sehen. Die einzige Lichtquelle ist ein kleines Fenster �ber dir, durch die ein schwacher Mondschein f�llt. Es ist also Nachts... Langsam versuchst du dich an die fast komplette Dunkelheit zu gew�hnen und erkennst, dass du dich in einem kleinen dir unbekannten Raum befindest. Dich packt die Angst! Was ist passiert, wo bist du und wie bist du hier gelandet?Du nimmst die Stahlkette in die Hand. Sie ist schwer und verrostet. Mit den H�nden tastest du dich voran bis an die Heizung, wo du ein Schloss an der Kette entdeckst.Das Mondlicht ist nur sehr schwach, um den Raum zu begutachten. Du gehst in die Knie und tastest mit deinem H�nden wild und in Panik am Betonboden. Pl�tzlich st��t du auf einen kleinen Gegenstand, der sich tats�chlich anf�hlt wie ein Schl�ssel. Du solltest ihn aufheben\\n]}");
|
||||
writer.close();
|
||||
}
|
||||
|
||||
//Raum Object
|
||||
keller = new Room("Keller");
|
||||
|
||||
durchgang.setNextRoom(keller);
|
||||
keller.setDescription("der kleine Mondschein, der zuvor den unbekannten Raum schwach beleuchtet hat, leuchtet viel gr��er und viel heller und du erkennst nun den gesamten Raum. Er ist klein und d�ster. "
|
||||
+ "überall h�ngen Spinnennetze und Staub sammelt sich am Betonboden. Du erkennst am anderen Ende des Raumes eine T�r");
|
||||
try {
|
||||
FileReader fr = new FileReader(file);
|
||||
BufferedReader br = new BufferedReader(fr);
|
||||
String jsonObject = br.readLine();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
//Puzzle Object
|
||||
schloss = new Puzzle("Schloss");
|
||||
schloss.setDescription("Es ist ein altes Schloss aus Metall, dass eine Einkerbung f�r einen Schl�ssel hat");
|
||||
schloss.setSolvedText("Ja, es hat funktioniert! Mit einem Knacksen geht das Schloss auf und du kannst dich von deiner Beinfessel befreien. ");
|
||||
try {
|
||||
jsonMap = objectMapper.readValue(jsonObject,
|
||||
new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
} catch (JsonParseException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (JsonMappingException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
log("Keyset:" + jsonMap.keySet().toString());
|
||||
return jsonMap;
|
||||
|
||||
keller.puzzles.add(schloss);
|
||||
} catch (FileNotFoundException e1) {
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
|
||||
//Ausgang
|
||||
door = new Puzzle("Tuer");
|
||||
door.setDescription("Ausgang aus dem Keller");
|
||||
door.setGameOverFlag(true);
|
||||
door.setSolvedText("Geschafft! Die Tuer ist offen. Das Intro ist nun beendet");
|
||||
keller.puzzles.add(door);
|
||||
return null;
|
||||
}
|
||||
|
||||
//Item Object
|
||||
schluessel = new Item("Schluessel");
|
||||
schluessel.setHiddenFlag(false);
|
||||
schluessel.setPortableFlag(true);
|
||||
schluessel.setDescription("Der Schl�ssel ist kalt und klein. Vielleicht hast du Gl�ck und er passt ins Schloss. Versuche es zu �ffnen!");
|
||||
schloss.addItem(schluessel);
|
||||
keller.items.add(schluessel);
|
||||
public static String writeJSON(File f) throws IOException {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String s = "";
|
||||
try (
|
||||
JsonGenerator jGenerator
|
||||
= mapper.getFactory().createGenerator(f,JsonEncoding.UTF8)) {
|
||||
|
||||
door.setDependency(schloss);
|
||||
door.setDependencyText("Du musst erst das Schloss der Kette knacken um die Tür öffnen zu können");
|
||||
jGenerator.writeStartObject();
|
||||
jGenerator.writeObjectField("room", rooms);
|
||||
jGenerator.writeObjectField("puzzle", puzzles);
|
||||
jGenerator.writeObjectField("item", items);
|
||||
jGenerator.writeObjectField("story", story);
|
||||
jGenerator.writeEndObject();
|
||||
jGenerator.close();
|
||||
|
||||
//Item Object
|
||||
stahlschluessel = new Item("Stahlschluessel");
|
||||
stahlschluessel.setHiddenFlag(false);
|
||||
stahlschluessel.setPortableFlag(false);
|
||||
stahlschluessel.setDescription("Ein Stahlschlüssel");
|
||||
intro.items.add(stahlschluessel);
|
||||
} catch (JsonGenerationException e) {
|
||||
e.printStackTrace();
|
||||
} catch (JsonMappingException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
rooms.add(intro);
|
||||
rooms.add(keller);
|
||||
story.add("Dein ganzer K�rper schmerzt, du liegst auf Betonboden. Du f�ngst laut an zu husten und Staubklumpen fliegen aus deinem Mund. Du �ffnest langsam und nur schwer die Augen, "
|
||||
+ "doch es ist fast gar nichts zu sehen. Die einzige Lichtquelle ist ein kleines Fenster �ber dir, durch die ein schwacher Mondschein f�llt. Es ist also Nachts... "
|
||||
+ "Langsam versuchst du dich an die fast komplette Dunkelheit zu gew�hnen und erkennst, dass du dich in einem kleinen dir unbekannten Raum befindest. Dich packt die Angst! "
|
||||
+ "Was ist passiert, wo bist du und wie bist du hier gelandet?"
|
||||
+ "Du nimmst die Stahlkette in die Hand. Sie ist schwer und verrostet. Mit den H�nden tastest du dich voran bis an die Heizung, wo du ein Schloss an der Kette entdeckst."
|
||||
+ "Das Mondlicht ist nur sehr schwach, um den Raum zu begutachten. Du gehst in die Knie und tastest mit deinem H�nden wild und in Panik am Betonboden. "
|
||||
+ "Pl�tzlich st��t du auf einen kleinen Gegenstand, der sich tats�chlich anf�hlt wie ein Schl�ssel. Du solltest ihn aufheben");
|
||||
BufferedReader reader = null;
|
||||
try {
|
||||
reader = new BufferedReader(new FileReader("game.JSON"));
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
|
||||
while ((line = reader.readLine()) != null) {
|
||||
s = s + (line + "\n");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public Item getItem(String s) {
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
if (items.get(i).getName().toLowerCase().equals(s.toLowerCase())) {
|
||||
if (currentRoom.getItems().contains(items.get(i).getId())) {
|
||||
return items.get(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Puzzle getPuzzle(String s) {
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
if (items.get(i).getName().toLowerCase().equals(s.toLowerCase())) {
|
||||
if (currentRoom.getPuzzles().contains(puzzles.get(i).getId())) {
|
||||
return puzzles.get(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void setVariables() throws Exception {
|
||||
|
||||
readJSON();
|
||||
log(readJSON().toString());
|
||||
log("Readjson fertig");
|
||||
|
||||
currentRoom = rooms.get(0);
|
||||
|
||||
currentRoom = intro;
|
||||
stoppFlag = false;
|
||||
inventory = new ArrayList<Item>();
|
||||
inventory = new ArrayList<>();
|
||||
|
||||
//log("JSON: " + writeJSON());
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
|
||||
|
||||
String jsonStringRoom = objectMapper.writeValueAsString(jsonMap.get("room"));
|
||||
String jsonStringItem = objectMapper.writeValueAsString(jsonMap.get("item"));
|
||||
String jsonStringPuzzle = objectMapper.writeValueAsString(jsonMap.get("puzzle"));
|
||||
String jsonStringStory = objectMapper.writeValueAsString(jsonMap.get("story"));
|
||||
|
||||
log("Item: " + jsonStringItem);
|
||||
log("Room: " + jsonStringRoom);
|
||||
log("Story: " + jsonStringStory);
|
||||
log("Puzzle: " + jsonStringPuzzle);
|
||||
|
||||
String[] st = objectMapper.readValue(jsonStringStory, String[].class);
|
||||
log("Story Array OK");
|
||||
Item[] it = objectMapper.readValue(jsonStringItem, Item[].class);
|
||||
log("Item Array OK");
|
||||
Puzzle[] pu = objectMapper.readValue(jsonStringPuzzle, Puzzle[].class);
|
||||
log("Puzzle Array OK");
|
||||
Room[] ro = objectMapper.readValue(jsonStringRoom, Room[].class);
|
||||
log("Room Array OK");
|
||||
|
||||
for (Room ro1 : ro) {
|
||||
log("Room: " + ro1.getName());
|
||||
log("Description: " + ro1.getDescription());
|
||||
}
|
||||
|
||||
for (Item it1 : it) {
|
||||
log("Item: " + it1.getName());
|
||||
log("Description: " + it1.getDescription());
|
||||
}
|
||||
|
||||
for (Puzzle pu1 : pu) {
|
||||
log("Puzzle: " + pu1.getName());
|
||||
log("Description: " + pu1.getDescription());
|
||||
log("DependencyText: " + pu1.getDependencyText());
|
||||
}
|
||||
|
||||
for (String st1 : st) {
|
||||
log("Story: " + st1);
|
||||
}
|
||||
}
|
||||
|
||||
public void play() throws Exception {
|
||||
log("play()");
|
||||
log("Input: " + input);
|
||||
log("currentRoom: " + currentRoom.getName());
|
||||
|
||||
for (int i = 0; i < currentRoom.getPuzzles().size(); i++) {
|
||||
log("Puzzle im Raum: " + currentRoom.getPuzzles().get(i)); //getPuzzles().get(i).getName());
|
||||
}
|
||||
for (int i = 0; i < currentRoom.getItems().size(); i++) {
|
||||
log("Item im Raum: " + currentRoom.getItems().get(i)); //getItems().get(i).getName());
|
||||
}
|
||||
|
||||
input = input.replace("ä", "ae");
|
||||
input = input.replace("ü", "ue");
|
||||
@ -115,11 +231,11 @@ public class Game {
|
||||
inputArray = input.split(" ");
|
||||
|
||||
for (String s : inputArray) {
|
||||
if (currentRoom.getItem(s) != null) {
|
||||
itemName = currentRoom.getItem(s).getName();
|
||||
if (getItem(s) != null) {
|
||||
itemName = getItem(s).getName();
|
||||
log("itemName: " + itemName);
|
||||
} else if (currentRoom.getPuzzle(s) != null) {
|
||||
puzzleName = currentRoom.getPuzzle(s).getName();
|
||||
} else if (getPuzzle(s) != null) {
|
||||
puzzleName = getPuzzle(s).getName();
|
||||
log("PuzzleName: " + puzzleName);
|
||||
} else {
|
||||
intentName = s;
|
||||
@ -134,22 +250,22 @@ public class Game {
|
||||
switch (intentName.toLowerCase()) {
|
||||
//intent
|
||||
case "lookaroundintent":
|
||||
log("Switch: lookAroundIntent");
|
||||
log("Switch: LookAroundIntent");
|
||||
if (itemName == null && puzzleName == null) {
|
||||
lookaround();
|
||||
}
|
||||
break;
|
||||
//intent
|
||||
case "inspectintent":
|
||||
log("Switch: inspectintent");
|
||||
if (itemName != null) {
|
||||
inspect(itemName);
|
||||
} else if (puzzleName != null) {
|
||||
inspect(puzzleName);
|
||||
log("Switch: InspectIntent");
|
||||
if (getItem(itemName) != null) {
|
||||
inspect(getItem(itemName));
|
||||
} else if (getPuzzle(puzzleName) != null) {
|
||||
inspect(getPuzzle(puzzleName));
|
||||
}
|
||||
break;
|
||||
//intent
|
||||
|
||||
//intent
|
||||
case "examineintent":
|
||||
log("Switch: ExamineIntent");
|
||||
if (itemName == null && puzzleName == null) {
|
||||
@ -160,15 +276,15 @@ public class Game {
|
||||
//intent
|
||||
case "takeintent":
|
||||
log("Switch: TakeIntent");
|
||||
if (itemName != null) {
|
||||
take(currentRoom.getItem(itemName));
|
||||
if (getItem(itemName) != null) {
|
||||
take(getItem(itemName));
|
||||
}
|
||||
break;
|
||||
//intent
|
||||
case "openintent":
|
||||
log("Switch: OpenIntent");
|
||||
if (puzzleName != null) {
|
||||
open(currentRoom.getPuzzle(puzzleName));
|
||||
if (getPuzzle(puzzleName) != null) {
|
||||
open(getPuzzle(puzzleName));
|
||||
}
|
||||
break;
|
||||
//intent
|
||||
@ -185,14 +301,18 @@ public class Game {
|
||||
if (itemName == null && puzzleName == null) {
|
||||
resetGame();
|
||||
for (int i = 0; i < currentRoom.puzzles.size(); i++) {
|
||||
if (currentRoom.puzzles.get(i).getNextRoom() != null) {
|
||||
setRoom(currentRoom.puzzles.get(i).getNextRoom());
|
||||
if (getPuzzleById(currentRoom.puzzles.get(i)).getNextRoom() != null) {
|
||||
setRoom(getRoomById(getPuzzleById(currentRoom.puzzles.get(i)).getNextRoom()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case "resumeintent":
|
||||
log("Switch: ResumeIntent");
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
itemName = null;
|
||||
@ -206,8 +326,35 @@ public class Game {
|
||||
}
|
||||
}
|
||||
|
||||
public void log(String s) throws Exception
|
||||
{
|
||||
public Room getRoomById(int i) {
|
||||
for (int j = 0; j < rooms.size(); j++) {
|
||||
if (rooms.get(j).getId() == i) {
|
||||
return rooms.get(j);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Item getItemById(int i) {
|
||||
for (int j = 0; j < items.size(); j++) {
|
||||
if (items.get(j).getId() == i) {
|
||||
return items.get(j);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public Puzzle getPuzzleById(int i) {
|
||||
for (int j = 0; j < puzzles.size(); j++) {
|
||||
if (puzzles.get(j).getId() == i) {
|
||||
return puzzles.get(j);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void log(String s) throws Exception {
|
||||
String url = "https://medinf.efi.th-nuernberg.de/tomcat/WebAdventure/Log";
|
||||
URL obj = new URL(url);
|
||||
HttpURLConnection httpConn = (HttpURLConnection) obj.openConnection();
|
||||
@ -219,11 +366,11 @@ public class Game {
|
||||
|
||||
// Send post request
|
||||
httpConn.setDoOutput(true);
|
||||
DataOutputStream wr = new DataOutputStream(httpConn.getOutputStream());
|
||||
try (DataOutputStream wr = new DataOutputStream(httpConn.getOutputStream())) {
|
||||
String urlParameters = "log=" + s;
|
||||
wr.writeBytes(urlParameters);
|
||||
wr.flush();
|
||||
wr.close();
|
||||
}
|
||||
|
||||
BufferedReader in = new BufferedReader(
|
||||
new InputStreamReader(httpConn.getInputStream()));
|
||||
@ -237,43 +384,44 @@ public class Game {
|
||||
}
|
||||
|
||||
public void lookaround() throws Exception {
|
||||
log("lookaround() ");
|
||||
log("lookaround()");
|
||||
say(currentRoom.getDescription());
|
||||
}
|
||||
|
||||
public void startGame() throws Exception {
|
||||
log("startGame() ");
|
||||
log("startGame()");
|
||||
for (int i = 0; i < story.size(); i++) {
|
||||
say(story.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public void resetGame() throws Exception {
|
||||
log("resetGame() ");
|
||||
log("resetGame()");
|
||||
startGame();
|
||||
}
|
||||
|
||||
public void inspect(String s) throws Exception {
|
||||
log("inspect(" + s + ") ");
|
||||
Item currentItem=null;
|
||||
if(currentRoom.getItem(s) != null)
|
||||
{
|
||||
currentItem= currentRoom.getItem(s);
|
||||
log("currentItem: " + currentItem.getName());
|
||||
public void inspect(Puzzle currentPuzzle) throws Exception {
|
||||
log("inspect(" + currentPuzzle.getName() + ")");
|
||||
|
||||
for (int i = 0; i < currentRoom.getItems().size(); i++) {
|
||||
if (Objects.equals(currentRoom.getPuzzles().get(i), currentPuzzle.getId())) {
|
||||
say(currentPuzzle.getDescription());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void inspect(Item currentItem) throws Exception {
|
||||
log("inspect(" + currentItem.getName() + ")");
|
||||
|
||||
for (int i = 0; i < currentRoom.getItems().size(); i++) {
|
||||
if (Objects.equals(currentRoom.getItems().get(i), currentItem.getId())) {
|
||||
say(currentItem.getDescription());
|
||||
}
|
||||
Puzzle currentPuzzle=null;
|
||||
|
||||
if(currentRoom.getPuzzle(s) != null)
|
||||
{
|
||||
currentPuzzle = currentRoom.getPuzzle(s);
|
||||
log("currentPuzzle " + currentPuzzle.getName());
|
||||
say(currentPuzzle.getDescription());
|
||||
}
|
||||
}
|
||||
|
||||
public void endGame() throws Exception {
|
||||
log("endGame() ");
|
||||
log("endGame()");
|
||||
say("Glückwunsch das Spiel ist beendet!");
|
||||
setVariables();
|
||||
}
|
||||
@ -309,7 +457,7 @@ public class Game {
|
||||
}
|
||||
|
||||
public void say(String s) throws Exception {
|
||||
log("say(" + s + ") ");
|
||||
log("say(" + s + ")");
|
||||
try {
|
||||
sendPost(s);
|
||||
} catch (Exception ex) {
|
||||
@ -318,12 +466,12 @@ public class Game {
|
||||
}
|
||||
|
||||
public void setInput(String s) throws Exception {
|
||||
log("setInput(" + s + ") ");
|
||||
log("setInput(" + s + ")");
|
||||
input = s;
|
||||
}
|
||||
|
||||
public void setRoom(Room nextRoom) throws Exception {
|
||||
log("setRoom(" + nextRoom.getName() + ") " );
|
||||
log("setRoom(" + nextRoom.getName() + ")");
|
||||
currentRoom = nextRoom;
|
||||
say(currentRoom.getDescription());
|
||||
}
|
||||
@ -354,13 +502,13 @@ public class Game {
|
||||
say("ist bereits geöffnet");
|
||||
if (currentPuzzle.getNextRoom() != null) // wenn es eine Tür ist die in den nächsten Raum führt
|
||||
{
|
||||
setRoom(currentPuzzle.getNextRoom()); // wechselt in den nächsten Raum
|
||||
setRoom(getRoomById(currentPuzzle.getNextRoom())); // wechselt in den nächsten Raum
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!currentPuzzle.hasDependency() || currentPuzzle.getDependency().isSolved()) // ist keine Abhängigkeit vorhanden oder aber die Abhängigkeit ist gelöst
|
||||
if (!currentPuzzle.hasDependency() || getPuzzleById(currentPuzzle.getDependency()).isSolved()) // ist keine Abhängigkeit vorhanden oder aber die Abhängigkeit ist gelöst
|
||||
{
|
||||
if (currentPuzzle.getItems().isEmpty() || getInventory().containsAll(currentPuzzle.getItems())) // keine Items zum lösen notwendig oder alle Items zum lösen befinden sich im Inventar
|
||||
if (currentPuzzle.getItems().isEmpty() || checkPuzzleItemsInInventory(currentPuzzle.getId())) // keine Items zum lösen notwendig oder alle Items zum lösen befinden sich im Inventar
|
||||
{
|
||||
currentPuzzle.setSolved(true); // auf gelöst setzen
|
||||
say(currentPuzzle.getSolvedText()); // Lösungstext
|
||||
@ -372,7 +520,7 @@ public class Game {
|
||||
|
||||
if (currentPuzzle.getNextRoom() != null) // wenn es eine Tür ist die in den nächsten Raum führt
|
||||
{
|
||||
setRoom(currentPuzzle.getNextRoom()); // wechselt in den nächsten Raum
|
||||
setRoom(getRoomById(currentPuzzle.getNextRoom())); // wechselt in den nächsten Raum
|
||||
}
|
||||
} else // Item zum lösen fehlt
|
||||
{
|
||||
@ -380,7 +528,7 @@ public class Game {
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentPuzzle.getDependency().isSolved()) // Abhängigkeit nicht gelöst
|
||||
if (!getPuzzleById(currentPuzzle.getDependency()).isSolved()) // Abhängigkeit nicht gelöst
|
||||
{
|
||||
say(currentPuzzle.getDependencyText());
|
||||
}
|
||||
@ -400,16 +548,19 @@ public class Game {
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<Room> getRooms() {
|
||||
return rooms;
|
||||
public boolean checkPuzzleItemsInInventory(int puzzleId) {
|
||||
Puzzle p = getPuzzleById(puzzleId);
|
||||
for (int i = 0; i < p.getItems().size(); i++) {
|
||||
if (inventory.contains(getItemById(p.getItems().get(i)))) {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public ArrayList<Item> getInventory() {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
public ArrayList<String> getStory() {
|
||||
return story;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,13 +1,24 @@
|
||||
|
||||
public class Item
|
||||
{
|
||||
private Integer id;
|
||||
private String name;
|
||||
private boolean portableFlag;
|
||||
private boolean hiddenFlag;
|
||||
private String description;
|
||||
public Item(String name)
|
||||
|
||||
public Item(Integer i, String n, boolean portable, boolean hidden, String desc)
|
||||
{
|
||||
this.name = name;
|
||||
id = i;
|
||||
name = n;
|
||||
portableFlag = portable;
|
||||
hiddenFlag = hidden;
|
||||
description = desc;
|
||||
}
|
||||
|
||||
public Item()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
@ -15,32 +26,21 @@ public class Item
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean isPortableFlag() {
|
||||
return portableFlag;
|
||||
}
|
||||
|
||||
public void setPortableFlag(boolean portableFlag) {
|
||||
this.portableFlag = portableFlag;
|
||||
}
|
||||
|
||||
public boolean isHiddenFlag() {
|
||||
return hiddenFlag;
|
||||
}
|
||||
|
||||
public void setHiddenFlag(boolean hiddenFlag) {
|
||||
this.hiddenFlag = hiddenFlag;
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
}
|
@ -61,7 +61,7 @@ public class Log extends HttpServlet {
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
response.setIntHeader("Refresh", 2);
|
||||
response.setIntHeader("Refresh", 10);
|
||||
try {
|
||||
processRequest(request, response);
|
||||
|
||||
@ -81,7 +81,7 @@ public class Log extends HttpServlet {
|
||||
@Override
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
response.setIntHeader("Refresh", 2);
|
||||
response.setIntHeader("Refresh", 10);
|
||||
try {
|
||||
processRequest(request, response);
|
||||
} catch (Exception ex) {
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.servlet.ServletException;
|
||||
@ -21,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
*/
|
||||
@WebServlet(urlPatterns = {"/IO"})
|
||||
public class Logic extends HttpServlet {
|
||||
private ArrayList<Game> games = new ArrayList<Game>();
|
||||
|
||||
/**
|
||||
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
|
||||
@ -35,8 +37,14 @@ public class Logic extends HttpServlet {
|
||||
String context = "";
|
||||
|
||||
public void init() {
|
||||
try {
|
||||
g.setVariables();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Logic.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException, Exception {
|
||||
@ -50,7 +58,7 @@ public class Logic extends HttpServlet {
|
||||
|
||||
out.println(context);
|
||||
|
||||
|
||||
//String deviceId = request.getParameter("deviceId"); // einzigartige DeviceID des Alexa Geräts
|
||||
|
||||
String input = request.getParameter("intent");
|
||||
if (request.getParameter("slot") != null) {
|
||||
@ -63,6 +71,17 @@ public class Logic extends HttpServlet {
|
||||
g.play();
|
||||
}
|
||||
|
||||
/* Mehrere Spieler auf einem Server
|
||||
for(int i = 0; i < games.size(); i++)
|
||||
{
|
||||
if(games.get(i).getId().equals(deviceId))
|
||||
{
|
||||
games.get(i).setInput(input);
|
||||
games.get(i).play();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,19 +2,34 @@ import java.util.ArrayList;
|
||||
|
||||
public class Puzzle
|
||||
{
|
||||
private Integer id;
|
||||
private String name;
|
||||
private ArrayList<Item> items = new ArrayList<Item>();
|
||||
private ArrayList<Integer> items = new ArrayList<>();
|
||||
private String description="";
|
||||
private boolean solved = false;
|
||||
private String solvedText = "";
|
||||
private boolean gameOverFlag=false;
|
||||
private Room nextRoom = null;
|
||||
private Integer nextRoom = null;
|
||||
private String dependencyText = null;
|
||||
private Puzzle dependency= null;
|
||||
private Integer dependency= null;
|
||||
|
||||
public Puzzle(String name)
|
||||
public Puzzle()
|
||||
{
|
||||
this.name = name;
|
||||
|
||||
}
|
||||
|
||||
public Puzzle(Integer i, String n, ArrayList<Integer> itemList, String desc, boolean solvedFlag, String solvedTxt, boolean gameOver, Integer next, String dependencytxt, Integer dependentFrom)
|
||||
{
|
||||
id = i;
|
||||
name = n;
|
||||
items = itemList;
|
||||
description = desc;
|
||||
solved = solvedFlag;
|
||||
solvedText = solvedTxt;
|
||||
gameOverFlag = gameOver;
|
||||
nextRoom = next;
|
||||
dependencyText = dependencytxt;
|
||||
dependency = dependentFrom;
|
||||
}
|
||||
|
||||
public boolean hasDependency()
|
||||
@ -22,17 +37,8 @@ public class Puzzle
|
||||
return dependency != null;
|
||||
}
|
||||
|
||||
public void setDependency(Puzzle p)
|
||||
{
|
||||
dependency = p;
|
||||
}
|
||||
|
||||
public void setDependencyText(String s)
|
||||
{
|
||||
dependencyText = s;
|
||||
}
|
||||
|
||||
public Puzzle getDependency()
|
||||
public Integer getDependency()
|
||||
{
|
||||
return dependency;
|
||||
}
|
||||
@ -42,60 +48,38 @@ public class Puzzle
|
||||
return dependencyText;
|
||||
}
|
||||
|
||||
public Room getNextRoom()
|
||||
public Integer getNextRoom()
|
||||
{
|
||||
return nextRoom;
|
||||
}
|
||||
|
||||
public void addItem(Item i)
|
||||
{
|
||||
items.add(i);
|
||||
}
|
||||
|
||||
public ArrayList<Item> getItems() {
|
||||
public ArrayList<Integer> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void setItems(ArrayList<Item> items) {
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getSolvedText() {
|
||||
return solvedText;
|
||||
}
|
||||
|
||||
public void setSolvedText(String solvedText) {
|
||||
this.solvedText = solvedText;
|
||||
}
|
||||
|
||||
public boolean isSolved() {
|
||||
return solved;
|
||||
}
|
||||
|
||||
public void setSolved(boolean solved) {
|
||||
this.solved = solved;
|
||||
}
|
||||
|
||||
public void setGameOverFlag(boolean b) {
|
||||
// TODO Auto-generated method stub
|
||||
gameOverFlag = b;
|
||||
|
||||
public void setSolved(boolean s)
|
||||
{
|
||||
solved = s;
|
||||
}
|
||||
|
||||
public boolean getGameOverFlag() {
|
||||
@ -103,8 +87,8 @@ public class Puzzle
|
||||
return gameOverFlag;
|
||||
}
|
||||
|
||||
public void setNextRoom(Room r)
|
||||
public Integer getId()
|
||||
{
|
||||
nextRoom = r;
|
||||
return id;
|
||||
}
|
||||
}
|
@ -3,60 +3,51 @@ import java.util.ArrayList;
|
||||
|
||||
public class Room
|
||||
{
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String description;
|
||||
private boolean gameoverFlag;
|
||||
ArrayList<Item> items = new ArrayList<>();
|
||||
ArrayList<Puzzle> puzzles = new ArrayList<>();
|
||||
public Room(String name)
|
||||
ArrayList<Integer> items = new ArrayList<>();
|
||||
ArrayList<Integer> puzzles = new ArrayList<>();
|
||||
|
||||
public Room()
|
||||
{
|
||||
this.name = name;
|
||||
|
||||
}
|
||||
|
||||
public Item getItem(String s)
|
||||
public Room(Integer i, String n, String desc, boolean gameover, ArrayList<Integer> itemList, ArrayList<Integer> puzzleList)
|
||||
{
|
||||
for(Item i: items)
|
||||
{
|
||||
if(i.getName().equalsIgnoreCase(s))
|
||||
return i;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Puzzle getPuzzle(String s)
|
||||
{
|
||||
for(Puzzle p: puzzles)
|
||||
{
|
||||
if(p.getName().equalsIgnoreCase(s))
|
||||
return p;
|
||||
}
|
||||
return null;
|
||||
id = i;
|
||||
name = n;
|
||||
description = desc;
|
||||
gameoverFlag = gameover;
|
||||
items = itemList;
|
||||
puzzles = puzzleList;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public boolean getGameoverFlag() {
|
||||
return gameoverFlag;
|
||||
}
|
||||
public void setGameoverFlag(boolean gameOverFlag) {
|
||||
gameoverFlag = gameOverFlag;
|
||||
}
|
||||
public ArrayList<Item> getItems() {
|
||||
|
||||
public ArrayList<Integer> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public ArrayList<Puzzle> getPuzzles() {
|
||||
public ArrayList<Integer> getPuzzles() {
|
||||
return puzzles;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
1
src/java/original.json
Normal file
1
src/java/original.json
Normal file
@ -0,0 +1 @@
|
||||
{"room":[{"id":0,"name":"Intro","description":"Hier ist das Intro von Kidnappd","gameoverFlag":false,"items":[],"puzzles":[0]},{"id":1,"name":"Keller","description":"der kleine Mondschein, der zuvor den unbekannten Raum schwach beleuchtet hat, leuchtet viel gr��er und viel heller und du erkennst nun den gesamten Raum. Er ist klein und d�ster. überall h�ngen Spinnennetze und Staub sammelt sich am Betonboden. Du erkennst am anderen Ende des Raumes eine T�r","gameoverFlag":false,"items":[0,1],"puzzles":[1,2]}],"puzzle":[{"id":0,"name":"Durchgang","items":[],"description":"Ausgang Intro Level","solved":false,"solvedText":"Hurra, du hast es geschafft","gameOverFlag":false,"nextRoom":null,"dependencyText":null,"dependency":null},{"id":1,"name":"Tuer","items":[1],"description":"Ausgang aus dem Keller","solved":false,"solvedText":"Geschafft! Die Tuer ist offen. Das Intro ist nun beendet","gameOverFlag":true,"nextRoom":null,"dependencyText":null,"dependency":null},{"id":2,"name":"Schloss","items":[0],"description":"Es ist ein altes Schloss aus Metall, dass eine Einkerbung f�r einen Schl�ssel hat","solved":false,"solvedText":"Ja, es hat funktioniert! Mit einem Knacksen geht das Schloss auf und du kannst dich von deiner Beinfessel befreien. ","gameOverFlag":false,"nextRoom":null,"dependencyText":null,"dependency":null}],"item":[{"id":1,"name":"Stahlschluessel","portableFlag":true,"hiddenFlag":false,"description":"Ein Stahlschlüssel"},{"id":0,"name":"Schluessel","portableFlag":true,"hiddenFlag":false,"description":"Der Schlüssel ist kalt und klein. Vielleicht hast du Glück und er passt ins Schloss. Versuche es zu öffnen!"}],"story":["Dein ganzer K�rper schmerzt, du liegst auf Betonboden. Du f�ngst laut an zu husten und Staubklumpen fliegen aus deinem Mund. Du �ffnest langsam und nur schwer die Augen, doch es ist fast gar nichts zu sehen. Die einzige Lichtquelle ist ein kleines Fenster �ber dir, durch die ein schwacher Mondschein f�llt. Es ist also Nachts... Langsam versuchst du dich an die fast komplette Dunkelheit zu gew�hnen und erkennst, dass du dich in einem kleinen dir unbekannten Raum befindest. Dich packt die Angst! Was ist passiert, wo bist du und wie bist du hier gelandet?Du nimmst die Stahlkette in die Hand. Sie ist schwer und verrostet. Mit den H�nden tastest du dich voran bis an die Heizung, wo du ein Schloss an der Kette entdeckst.Das Mondlicht ist nur sehr schwach, um den Raum zu begutachten. Du gehst in die Knie und tastest mit deinem H�nden wild und in Panik am Betonboden. Pl�tzlich st��t du auf einen kleinen Gegenstand, der sich tats�chlich anf�hlt wie ein Schl�ssel. Du solltest ihn aufheben"]}
|
Loading…
x
Reference in New Issue
Block a user