commit
7ae9f256b9
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.dungeoncrawler;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jonathan
|
||||
*/
|
||||
public abstract class Item {
|
||||
private int amount;
|
||||
|
||||
public Item(int amount){
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the amount
|
||||
*/
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param amount the amount to set
|
||||
*/
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.dungeoncrawler.items;
|
||||
|
||||
import com.dungeoncrawler.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jonathan
|
||||
*/
|
||||
public class Key extends Item {
|
||||
|
||||
public Key(int amount) {
|
||||
super(amount);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.dungeoncrawler.items;
|
||||
|
||||
import com.dungeoncrawler.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jonathan
|
||||
*/
|
||||
public class Potion extends Item {
|
||||
|
||||
public Potion(int amount) {
|
||||
super(amount);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.dungeoncrawler.items;
|
||||
|
||||
import com.dungeoncrawler.Item;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jonathan
|
||||
*/
|
||||
public class Sword extends Item {
|
||||
|
||||
public Sword(int amount) {
|
||||
super(amount);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in new issue