Добавлена функция GetPlanes в классе PlanesGenericCollection

This commit is contained in:
Никита Потапов 2023-12-17 17:41:47 +04:00
parent 647bfc4c5b
commit e781e215bc

View File

@ -1,6 +1,7 @@
package ProjectStormtrooper;
import java.awt.*;
import java.util.ArrayList;
import java.util.Stack;
public class PlanesGenericCollection<T extends DrawingPlane, U extends IMoveableObject> {
@ -9,6 +10,9 @@ public class PlanesGenericCollection<T extends DrawingPlane, U extends IMoveable
private final int _placeSizeWidth = 160;
private final int _placeSizeHeight = 120;
private SetGeneric<T> _collection;
public ArrayList<T> GetPlanes() {
return _collection.GetEnumerator();
}
public PlanesGenericCollection(int picWidth, int picHeight) {
int horizontalObjectsCount = picWidth / _placeSizeWidth;