Extra spaces were removed.

This commit is contained in:
1yuee 2022-11-08 20:49:56 +04:00
parent 58305e652e
commit 1992b7d08d

View File

@ -31,7 +31,6 @@ public abstract class AbstractMap
GenerateMap();
}
return DrawMapWithObject();
}
public Image MoveObject(Direction direction)
@ -43,8 +42,6 @@ public abstract class AbstractMap
//COLLISION CHECK
if (direction == Direction.Up)
{
for (int i = 0; i < _map.length; i++)
{
for (int j = 0; j < _map[i].length; j++)
@ -53,9 +50,6 @@ public abstract class AbstractMap
{
Point LeftTop = new Point((int)_drawingObject.getCurrentPosition().Left(), (int)(_drawingObject.getCurrentPosition().Top() - _drawingObject.getStep()));
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
Rectangle rectBarrier = new Rectangle((int)(i * _size_x), (int)(j * _size_y), (int)_size_x, (int)_size_y);
if (objectRect.intersects(rectBarrier))
@ -96,7 +90,6 @@ public abstract class AbstractMap
{
if (_map[i][j] == _barrier)
{
Point LeftTop = new Point((int)(_drawingObject.getCurrentPosition().Left() - _drawingObject.getStep()), (int)_drawingObject.getCurrentPosition().Top());
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
@ -121,12 +114,8 @@ public abstract class AbstractMap
{
Point LeftTop = new Point((int)(_drawingObject.getCurrentPosition().Left() + _drawingObject.getStep()), (int)_drawingObject.getCurrentPosition().Top());
Rectangle objectRect = new Rectangle(LeftTop, objSize1);
Rectangle rectBarrier = new Rectangle((int)(i * _size_x), (int)(j * _size_y), (int)_size_x, (int)_size_y);
if (objectRect.intersects(rectBarrier))
{
CollisionFlag = 1;
@ -171,7 +160,6 @@ public abstract class AbstractMap
}
}
}
}
@ -206,8 +194,6 @@ public abstract class AbstractMap
return img;
}
protected abstract void GenerateMap();
protected abstract void DrawRoadPart(Graphics g, int i, int j);