Browse Source

Merge origin/master

master
Edi 5 years ago
parent
commit
5fabb9780e
4 changed files with 29 additions and 26 deletions
  1. 29
    1
      src/java/Game.java
  2. 0
    9
      src/java/Item.java
  3. 0
    9
      src/java/Puzzle.java
  4. 0
    7
      src/java/Room.java

+ 29
- 1
src/java/Game.java View File

Item tonne; Item tonne;
public Game() { public Game() {
try {
try {
startGame(); startGame();
} catch (Exception ex) { } catch (Exception ex) {
Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex); Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);
say("das kann nicht geöffnet werden"); say("das kann nicht geöffnet werden");
} }
break; break;
//intent
case "resetintent":
{
if (itemName == null && puzzleName == null) {
say("Das Spiel wird nun neu gestartet");
resetGame();
}
}
//intent
case "skipintent":
{
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());
say(currentRoom.puzzles.get(i).getNextRoom().getDescription());
}
}
}
}
} }
itemName = null; itemName = null;
intentName = null; intentName = null;
say(story.get(i)); say(story.get(i));
} }
} }
public void resetGame(){
startGame();
}
public void inspect(String s) { public void inspect(String s) {
Item currentItem = currentRoom.getItem(s); Item currentItem = currentRoom.getItem(s);

+ 0
- 9
src/java/Item.java View File

public class Item public class Item
{ {
private int id;
private String name; private String name;
private boolean portableFlag; private boolean portableFlag;
private boolean hiddenFlag; private boolean hiddenFlag;
this.description = description; this.description = description;
} }
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() { public String getName() {
return name; return name;
} }

+ 0
- 9
src/java/Puzzle.java View File

public class Puzzle public class Puzzle
{ {
private int id;
private String name; private String name;
private ArrayList<Item> items = new ArrayList<Item>(); private ArrayList<Item> items = new ArrayList<Item>();
private String description=""; private String description="";
{ {
return dependencyText; return dependencyText;
} }
public int getId() {
return id;
}
public Room getNextRoom() public Room getNextRoom()
{ {
return nextRoom; return nextRoom;
} }
public void setId(int id) {
this.id = id;
}
public void addItem(Item i) public void addItem(Item i)
{ {

+ 0
- 7
src/java/Room.java View File

public class Room public class Room
{ {
private int id;
private String name; private String name;
private String description; private String description;
private boolean gameoverFlag; private boolean gameoverFlag;
return null; return null;
} }
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() { public String getName() {
return name; return name;
} }

Loading…
Cancel
Save