I give up
This commit is contained in:
		@@ -27,7 +27,7 @@ Dette prosjektet inneholder [Semesteroppgave 1](SEM-1.md). Du kan også [lese op
 | 
			
		||||
* Del A: [x] helt ferdig, [ ] delvis ferdig
 | 
			
		||||
* Del B: [x] helt ferdig, [ ] delvis ferdig
 | 
			
		||||
* Del C: [X] helt ferdig, [ ] delvis ferdig
 | 
			
		||||
* [ ] hele semesteroppgaven er ferdig og klar til retting!
 | 
			
		||||
* [x] hele semesteroppgaven er ferdig og klar til retting!
 | 
			
		||||
 | 
			
		||||
# Del A
 | 
			
		||||
## Svar på spørsmål
 | 
			
		||||
 
 | 
			
		||||
@@ -17,11 +17,9 @@ public class Player implements IPlayer {
 | 
			
		||||
    private int attack = 40;
 | 
			
		||||
    private int defence = 20;
 | 
			
		||||
    private final Backpack equipped = new Backpack();
 | 
			
		||||
    // True if the player wants to pick up something using the digit keys
 | 
			
		||||
    private boolean dropping = false;
 | 
			
		||||
    // True if the player wants to drop something using the digit keys
 | 
			
		||||
    private boolean picking = false;
 | 
			
		||||
    private boolean writing = false;
 | 
			
		||||
    private boolean dropping = false; //True if the player wants to drop something using the digit keys
 | 
			
		||||
    private boolean picking = false; //True if the player wants to pick up something using the digit keys
 | 
			
		||||
    private boolean writing = false; //True if the user is writing a name
 | 
			
		||||
    private  boolean exploringChest = false;
 | 
			
		||||
    private String text = "";
 | 
			
		||||
    private String name = "Player";
 | 
			
		||||
@@ -150,12 +148,13 @@ public class Player implements IPlayer {
 | 
			
		||||
        if (items.size() < 1) {
 | 
			
		||||
            game.displayMessage("There is nothing to pick up");
 | 
			
		||||
        } else {
 | 
			
		||||
            if (items.get(0) instanceof IStatic && items.get(0) instanceof IContainer) { //A Static item is always the biggest (and hopefully the only) item on a tile.
 | 
			
		||||
            IItem item = items.get(0);
 | 
			
		||||
            if (item instanceof IStatic && item instanceof IContainer) { //A Static item is always the biggest (and hopefully the only) item on a tile.
 | 
			
		||||
                openChest(game, items);
 | 
			
		||||
            } else if (items.get(0) instanceof IStatic && items.get(0) instanceof StairsUp) {
 | 
			
		||||
            } else if (item instanceof IStatic && item instanceof StairsUp) {
 | 
			
		||||
                ((Game)game).goUp();
 | 
			
		||||
                return true;
 | 
			
		||||
            } else if (items.get(0) instanceof IStatic && items.get(0) instanceof StairsDown) {
 | 
			
		||||
            } else if (item instanceof IStatic && item instanceof StairsDown) {
 | 
			
		||||
                ((Game)game).goDown();
 | 
			
		||||
                return true;
 | 
			
		||||
            } else {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user