Class Bag
java.lang.Object
com.deco2800.game.components.player.Bag
- All Implemented Interfaces:
BagInterface
public class Bag extends java.lang.Object implements BagInterface
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
Bag.BagIterator
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Bag()
-
Method Summary
-
Constructor Details
-
Bag
public Bag()
-
-
Method Details
-
iterator
Description copied from interface:BagInterface
背包迭代器- Specified by:
iterator
in interfaceBagInterface
- Returns:
- 背包迭代器,用于访问背包中每个项
-
add
Description copied from interface:BagInterface
添加物品- Specified by:
add
in interfaceBagInterface
- Parameters:
e
- 物品
-
remove
Description copied from interface:BagInterface
移除装备- Specified by:
remove
in interfaceBagInterface
- Parameters:
e
- 物品
-
move
Description copied from interface:BagInterface
物品交换位置- Specified by:
move
in interfaceBagInterface
- Parameters:
e1
- 物品1e2
- 物品2
-