minor refactor regarding Box.weight(), weight is now also an attribute

This commit is contained in:
Kjistóf 2016-04-23 13:15:30 +02:00
parent 19aad35791
commit d60400b5f4

View File

@ -2,6 +2,8 @@ package cicaprojekt;
public class Box implements cicaprojekt.Pickable, cicaprojekt.Destroyable
{
private int weight = 5;
public Box(){
Menu.addTab();
@ -30,6 +32,6 @@ public class Box implements cicaprojekt.Pickable, cicaprojekt.Destroyable
System.out.println(">" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.weight()");
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.weight()");
Menu.removeTab();
return 5;
return this.weight;
}
}