Mochalov D.V. LabWork08 #8

Closed
b0n3l3sS wants to merge 5 commits from LabWork08 into LabWork07
Showing only changes of commit 155ebec8ff - Show all commits

View File

@ -170,21 +170,20 @@ namespace Locomotive
{
return false;
}
var otherMap = other as AbstractMap;
if (otherMap == null)
if (other == null)
{
return false;
}
if (_width != otherMap._width) return false;
if (_height != otherMap._height) return false;
if (_size_x != otherMap._size_x) return false;
if (_size_y != otherMap._size_y) return false;
if (_width != other._width) return false;
if (_height != other._height) return false;
if (_size_x != other._size_x) return false;
if (_size_y != other._size_y) return false;
for (int i = 0; i < _map.GetLength(0); i++)
{
for (int j = 0; j < _map.GetLength(1); j++)
{
if (_map[i,j] != otherMap._map[i,j]) return false;
if (_map[i,j] != other._map[i,j]) return false;
}
}
return true;