From fd9a9ed114958f740ba1a5962cbfcce55a788e56 Mon Sep 17 00:00:00 2001 From: the Date: Mon, 21 Nov 2022 16:50:22 +0400 Subject: [PATCH] Fix2 --- Ship/Ship/AbstractMap.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Ship/Ship/AbstractMap.cs b/Ship/Ship/AbstractMap.cs index 5de5a27..233853a 100644 --- a/Ship/Ship/AbstractMap.cs +++ b/Ship/Ship/AbstractMap.cs @@ -56,17 +56,13 @@ namespace Ship private bool ObjectIntersects() { var location = _drawingObject.GetCurrentPosition(); - Debug.WriteLine(location.Left + " " + location.Right + " " + location.Top + " " + location.Bottom); for (int i = 0; i < _map.GetLength(0); i++) { for (int j = 0; j < _map.GetLength(1); j++) { if (_map[i, j] == _barrier) { - Debug.WriteLine("Barrier found " + i * _size_x + " " + (i + 1) * _size_x + " " + j * _size_y + " " + (j+1)*_size_y + " " + (i * _size_x >= location.Left) + " " + ((i + 1) * _size_x <= location.Right) + " " + (j * _size_y >= location.Top) + " " + ((j + 1) * _size_y <= location.Bottom)); - if (i * _size_x >= location.Left && (i + 1) * _size_x <= location.Right && j * _size_y >= location.Top && (j + 1) * _size_y <= location.Bottom) { - Debug.WriteLine("True"); return true; } }