minor refactor regarding Box.weight(), weight is now also an attribute
This commit is contained in:
parent
19aad35791
commit
d60400b5f4
@ -2,6 +2,8 @@ package cicaprojekt;
|
|||||||
|
|
||||||
public class Box implements cicaprojekt.Pickable, cicaprojekt.Destroyable
|
public class Box implements cicaprojekt.Pickable, cicaprojekt.Destroyable
|
||||||
{
|
{
|
||||||
|
private int weight = 5;
|
||||||
|
|
||||||
|
|
||||||
public Box(){
|
public Box(){
|
||||||
Menu.addTab();
|
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()");
|
||||||
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.weight()");
|
System.out.println("<" + "[" + ":" + this.getClass().getSimpleName() + "]" + Menu.tabulator + "Box.weight()");
|
||||||
Menu.removeTab();
|
Menu.removeTab();
|
||||||
return 5;
|
return this.weight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user