Presnyakova V.V Lab_8 #17

Closed
Victoria_Presnyakova wants to merge 12 commits from Lab_8 into Lab_7
2 changed files with 13 additions and 1 deletions
Showing only changes of commit 68170b1023 - Show all commits

View File

@ -206,6 +206,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AbstractMap.cs" />
<Compile Include="BoatCompareByColor.cs" />
<Compile Include="BoatCompareByType.cs" />
<Compile Include="BoatNotFoundException.cs" />
<Compile Include="DrawingCatamaran.cs" />

View File

@ -47,7 +47,18 @@ namespace Catamaran
{
return false;
}
// TODO доделать проверки в случае продвинутого объекта
//доделать проверки в случае продвинутого объекта
var catamaran = boat as EntityCatamaran;
var otherCatamaran = otherBoatBoat as EntityCatamaran;
if (catamaran == null && otherCatamaran == null) return true;
if (catamaran == null || otherCatamaran == null) return false;
if (catamaran.DopColor != otherCatamaran.DopColor) return false;
if (catamaran.Sail != otherCatamaran.Sail) return false;
if (catamaran.Floats != otherCatamaran.Floats) return false;
return true;
}
public void MoveObject(Direction direction)