Markov D.P. LabWork03 #6
26
ContainerShip/ContainerShip/ContainerShip - Backup.csproj
Normal file
26
ContainerShip/ContainerShip/ContainerShip - Backup.csproj
Normal file
@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
@ -8,6 +8,10 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="ContainerShip.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
|
@ -33,9 +33,9 @@ namespace ContainerShip
|
||||
_map = map;
|
||||
}
|
||||
|
||||
public static int operator +(MapWithSetShipGeneric<T, U> map, T car)
|
||||
public static int operator +(MapWithSetShipGeneric<T, U> map, T ship)
|
||||
{
|
||||
return map._setShip.Insert(car);
|
||||
return map._setShip.Insert(ship);
|
||||
}
|
||||
|
||||
public static T operator -(MapWithSetShipGeneric<T, U> map, int
|
||||
@ -58,10 +58,10 @@ namespace ContainerShip
|
||||
Shaking();
|
||||
for (int i = 0; i < _setShip.Count; i++)
|
||||
{
|
||||
var car = _setShip.Get(i);
|
||||
if (car != null)
|
||||
var ship = _setShip.Get(i);
|
||||
if (ship != null)
|
||||
{
|
||||
return _map.CreateMap(_pictureWidth, _pictureHeight, car);
|
||||
return _map.CreateMap(_pictureWidth, _pictureHeight, ship);
|
||||
}
|
||||
}
|
||||
return new(_pictureWidth, _pictureHeight);
|
||||
@ -85,10 +85,10 @@ namespace ContainerShip
|
||||
{
|
||||
for (; j > i; j--)
|
||||
{
|
||||
var car = _setShip.Get(j);
|
||||
if (car != null)
|
||||
var ship = _setShip.Get(j);
|
||||
if (ship != null)
|
||||
{
|
||||
_setShip.Insert(car, i);
|
||||
_setShip.Insert(ship, i);
|
||||
_setShip.Remove(j);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user