add rewrite
This commit is contained in:
parent
5063d4d157
commit
4e206defed
BIN
.vs/slnx.sqlite
BIN
.vs/slnx.sqlite
Binary file not shown.
@ -24,7 +24,9 @@ public class MapWithSetMachineGeneric<T extends IDrawingObject, U extends Abstra
|
||||
_pictureHeight = picHeight;
|
||||
_map = map;
|
||||
}
|
||||
|
||||
public void Clear() {
|
||||
_setCars.Clear();
|
||||
}
|
||||
public int add(T car)
|
||||
{
|
||||
return _setCars.Insert(car);
|
||||
|
@ -218,6 +218,9 @@ public class MapsCollection {
|
||||
break;
|
||||
}
|
||||
_mapStorages.put(elem[0], new MapWithSetMachineGeneric<IDrawingObject, AbstractMap>(_pictureWidth, _pictureHeight, map));
|
||||
if(_mapStorages.containsKey(elem[0])){
|
||||
_mapStorages.get(elem[0]).Clear();
|
||||
}
|
||||
while((str = br.readLine()) != null) {
|
||||
_mapStorages.get(elem[0]).LoadData(str.split(separatorData + "\n?"));
|
||||
}
|
||||
|
@ -13,7 +13,11 @@ public class SetArmoredCarsGeneric<T> implements Iterable<T>{
|
||||
public int getCount() {
|
||||
return _places.isEmpty() ? 0 : _places.size();
|
||||
}
|
||||
|
||||
|
||||
public void Clear() {
|
||||
_places.clear();
|
||||
}
|
||||
|
||||
public int Insert(T armoredCar)
|
||||
{
|
||||
if(_places.size()+1 <= _MaxCount) return Insert(armoredCar, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user