проверки в случае продвинутого объекта
This commit is contained in:
parent
8bd07b13ac
commit
68170b1023
@ -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" />
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user