Убраны лишние строчки.
This commit is contained in:
parent
0449822d9e
commit
2d1622a1b6
@ -19,21 +19,17 @@ namespace Liner
|
||||
}
|
||||
public int Insert(T ship)
|
||||
{
|
||||
if (_places.Count > _maxCount)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
return Insert(ship, 0);
|
||||
}
|
||||
public int Insert(T ship, int position)
|
||||
{
|
||||
if (position >= _maxCount || position < 0) return -1;
|
||||
if (position < 0 || position > Count || _maxCount == Count) return -1;
|
||||
_places.Insert(position, ship);
|
||||
return position;
|
||||
}
|
||||
public T Remove(int position)
|
||||
{
|
||||
if (position >= _maxCount || position < 0)
|
||||
if (position >= Count || position < 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@ -45,7 +41,7 @@ namespace Liner
|
||||
{
|
||||
get
|
||||
{
|
||||
if (position >= _places.Count || position < 0)
|
||||
if (position >= Count || position < 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@ -53,7 +49,7 @@ namespace Liner
|
||||
}
|
||||
set
|
||||
{
|
||||
if (position >= _places.Count || position < 0)
|
||||
if (position >= Count || position < 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user