Merge origin/master
This commit is contained in:
parent
590427f401
commit
5fabb9780e
@ -158,6 +158,29 @@ public class Game {
|
|||||||
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;
|
||||||
@ -178,6 +201,11 @@ public class Game {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void resetGame(){
|
||||||
|
|
||||||
|
startGame();
|
||||||
|
}
|
||||||
|
|
||||||
public void inspect(String s) {
|
public void inspect(String s) {
|
||||||
Item currentItem = currentRoom.getItem(s);
|
Item currentItem = currentRoom.getItem(s);
|
||||||
Puzzle currentPuzzle = currentRoom.getPuzzle(s);
|
Puzzle currentPuzzle = currentRoom.getPuzzle(s);
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
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;
|
||||||
@ -21,14 +20,6 @@ public class Item
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
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="";
|
||||||
@ -43,19 +42,11 @@ public class Puzzle
|
|||||||
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)
|
||||||
{
|
{
|
||||||
items.add(i);
|
items.add(i);
|
||||||
|
@ -3,7 +3,6 @@ import java.util.ArrayList;
|
|||||||
|
|
||||||
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;
|
||||||
@ -34,12 +33,6 @@ public class Room
|
|||||||
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…
x
Reference in New Issue
Block a user