diff --git a/.DS_Store b/.DS_Store
index 6ef9ce9..3e0c17a 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/.idea/.idea.RobotIntelFinal/.idea/contentModel.xml b/.idea/.idea.RobotIntelFinal/.idea/contentModel.xml
index 8bae461..9a6cf1f 100644
--- a/.idea/.idea.RobotIntelFinal/.idea/contentModel.xml
+++ b/.idea/.idea.RobotIntelFinal/.idea/contentModel.xml
@@ -7,7 +7,6 @@
-
@@ -15,6 +14,7 @@
+
@@ -38,16 +38,27 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.idea/.idea.RobotIntelFinal/.idea/workspace.xml b/.idea/.idea.RobotIntelFinal/.idea/workspace.xml
index 9ff8581..214598c 100644
--- a/.idea/.idea.RobotIntelFinal/.idea/workspace.xml
+++ b/.idea/.idea.RobotIntelFinal/.idea/workspace.xml
@@ -18,21 +18,24 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
+
@@ -50,38 +53,10 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -90,16 +65,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -112,39 +100,41 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
@@ -156,7 +146,7 @@
-
+
@@ -222,7 +212,9 @@
-
+
+
+
@@ -247,33 +239,10 @@
-
-
-
- file://$PROJECT_DIR$/ConsoleApp/PathPlanners/PathPlanner.cs
- 34
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ConsoleApp/.DS_Store b/ConsoleApp/.DS_Store
new file mode 100644
index 0000000..4cc31e4
Binary files /dev/null and b/ConsoleApp/.DS_Store differ
diff --git a/ConsoleApp/ConsoleApp.csproj b/ConsoleApp/ConsoleApp.csproj
index f73aec2..b47461a 100644
--- a/ConsoleApp/ConsoleApp.csproj
+++ b/ConsoleApp/ConsoleApp.csproj
@@ -22,7 +22,7 @@
PreserveNewest
-
+
PreserveNewest
diff --git a/ConsoleApp/HexPlot.py b/ConsoleApp/HexPlot.py
deleted file mode 100644
index a10fbe8..0000000
--- a/ConsoleApp/HexPlot.py
+++ /dev/null
@@ -1,39 +0,0 @@
-import numpy as np
-import matplotlib.pyplot as plt
-import matplotlib
-
-
-if __name__ == "__main__":
- xc = []
- yc = []
- xm = []
- ym = []
- xf = []
- yf = []
- with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexPath.txt") as c:
- for line in c:
- x, y = line.split()
- xc.append(int(x))
- yc.append(int(y))
-
- with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/Mines.txt") as m:
- for line in m:
- x, y = line.split()
- xm.append(int(x))
- ym.append(int(y))
-
- with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexDetectedMines.txt") as f:
- for line in f:
- x, y = line.split()
- xf.append(int(x))
- yf.append(int(y))
- fig = plt.figure()
- plt.plot(xc, yc)
- plt.plot(xc, yc, 'o', label='vehicle', color='blue')
- plt.plot(xm, ym, 'o', label='all mines', color='red')
- plt.plot(xf, yf, 'o', label='detected mines', color='orange')
- plt.title('Hex Simulation')
- plt.legend(loc='lower left', fontsize='xx-small')
-
- matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexTest.png')
- plt.close(fig)
\ No newline at end of file
diff --git a/ConsoleApp/ISimulationResults.cs b/ConsoleApp/ISimulationResults.cs
index e8f930a..23cd46c 100644
--- a/ConsoleApp/ISimulationResults.cs
+++ b/ConsoleApp/ISimulationResults.cs
@@ -15,5 +15,13 @@ namespace ConsoleApp
List Mines { get; set; }
int HexClearedCells { get; set; }
int HexUnClearedCells { get; set; }
+ List SquarePath { get; set; }
+ List SquareMappedBombs { get; set; }
+ int SquareCellsUncleared { get; set; }
+ int SquareCellsCleared { get; set; }
+ int SquareBombsFound { get; set; }
+ int SquareTotalMoves { get; set; }
+ List SquareCoveredCells { get; set; }
+ List HexCoveredCells { get; set; }
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Maps/AstarSquareSearch.cs b/ConsoleApp/Maps/AstarSquareSearch.cs
new file mode 100644
index 0000000..929a7dd
--- /dev/null
+++ b/ConsoleApp/Maps/AstarSquareSearch.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using HexCore;
+
+namespace ConsoleApp.Maps
+{
+ public class AstarSquareSearch
+ {
+ private static double Heuristic(ICell a, ICell b)
+ {
+ return Math.Abs(a.X - b.X) + Math.Abs(a.Y - b.Y);
+ }
+
+ public static List FindShortestPath(ISquareMap graph, ICell start, ICell goal)
+ {
+ var costSoFar = new Dictionary();
+ var cameFrom = new Dictionary();
+ var frontier = new PriorityQueue();
+
+ frontier.Enqueue(start, 0);
+ cameFrom[start] = start;
+ costSoFar[start] = 0;
+
+ while (frontier.Count > 0)
+ {
+ var current = frontier.Dequeue();
+
+ if (current.Equals(goal)) break;
+
+ foreach (var next in graph.GetPassableNeighbors(current))
+ {
+ var newCost = costSoFar[current] + (int)graph.GetCell(next.X, next.Y).Coverage;
+ if (costSoFar.ContainsKey(next) && newCost >= costSoFar[next]) continue;
+ costSoFar[next] = newCost;
+ var priority = newCost + Heuristic(next, goal);
+ frontier.Enqueue(next, priority);
+ cameFrom[next] = current;
+ }
+ }
+
+ var path = new List();
+ var pathWasNotFound = !cameFrom.ContainsKey(goal);
+
+ // Returning an empty list if the path wasn't found
+ if (pathWasNotFound) return path;
+
+ // Reconstructing path
+ var curr = goal;
+ while (!curr.Equals(start))
+ {
+ path.Add(curr);
+ curr = cameFrom[curr];
+ }
+
+ // Reverse it to start at actual start point
+ path.Reverse();
+ return path;
+ }
+ }
+}
\ No newline at end of file
diff --git a/ConsoleApp/Maps/Cell.cs b/ConsoleApp/Maps/Cell.cs
index ef9bfd4..0acb659 100644
--- a/ConsoleApp/Maps/Cell.cs
+++ b/ConsoleApp/Maps/Cell.cs
@@ -4,20 +4,23 @@ namespace ConsoleApp.Maps
{
public enum Coverage
{
- Uncoverd,
+ //Order here matters these are cast to ints for the heuristic algorithm
+ Uncovered,
Covered
}
- public struct Cell : ICell
+ public class Cell : ICell
{
public int X { get; }
public int Y { get; }
public Coverage Coverage { get; set; }
+ public bool Blocked { get; set; }
public Cell(int x, int y)
{
X = x;
Y = y;
- Coverage = Coverage.Uncoverd;
+ Coverage = Coverage.Uncovered;
+ Blocked = false;
}
diff --git a/ConsoleApp/Maps/ICell.cs b/ConsoleApp/Maps/ICell.cs
index db8db85..b06956f 100644
--- a/ConsoleApp/Maps/ICell.cs
+++ b/ConsoleApp/Maps/ICell.cs
@@ -5,5 +5,6 @@ namespace ConsoleApp.Maps
int X { get; }
int Y { get; }
Coverage Coverage { get; set; }
+ bool Blocked { get; set; }
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Maps/ISquareMap.cs b/ConsoleApp/Maps/ISquareMap.cs
index 3d5e915..8b0a809 100644
--- a/ConsoleApp/Maps/ISquareMap.cs
+++ b/ConsoleApp/Maps/ISquareMap.cs
@@ -12,6 +12,9 @@ namespace ConsoleApp.Maps
Cell GetCell(int x, int y);
int Height { get; }
int Width { get; }
- List GetRange(Cell centerCell, int radius);
+ List GetRange(ICell centerCell, int radius);
+ List GetNeighbors(ICell cell);
+ List GetPassableNeighbors(ICell cell);
+ List GetShortestPath(ICell start, ICell goal);
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Maps/MapExtensions.cs b/ConsoleApp/Maps/MapExtensions.cs
index 4e3e0ab..b67b475 100644
--- a/ConsoleApp/Maps/MapExtensions.cs
+++ b/ConsoleApp/Maps/MapExtensions.cs
@@ -1,5 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using Example;
+
namespace ConsoleApp.Maps
{
+
public static class MapExtensions
{
public static void Fill2DArray(this T[,] arr, T value)
diff --git a/ConsoleApp/Maps/SquareMap.cs b/ConsoleApp/Maps/SquareMap.cs
index 2c92e55..f43cf23 100644
--- a/ConsoleApp/Maps/SquareMap.cs
+++ b/ConsoleApp/Maps/SquareMap.cs
@@ -1,5 +1,9 @@
using System;
using System.Collections.Generic;
+using System.Linq;
+using System.Reflection.Metadata.Ecma335;
+using System.Threading;
+using HexCore;
namespace ConsoleApp.Maps
@@ -29,8 +33,7 @@ namespace ConsoleApp.Maps
//Initialize Map
Map = new Cell[x, y];
- //set last cell;
- StartingCell = Map[0, 0];
+
for (int i = 0; i < x; i++)
{
for (int j = 0; j < y; j++)
@@ -38,6 +41,9 @@ namespace ConsoleApp.Maps
Map[i,j] = new Cell(i, j);
}
}
+
+ //set Starting cell;
+ StartingCell = GetCell(0,0);
}
@@ -56,8 +62,13 @@ namespace ConsoleApp.Maps
return possibles;
}
+
+ public List GetShortestPath(ICell start, ICell goal)
+ {
+ return AstarSquareSearch.FindShortestPath(this, start, goal);
+ }
- public List GetRange(Cell centerCell, int radius)
+ public List GetRange(ICell centerCell, int radius)
{
var inRange = new List();
var cx = centerCell.X;
@@ -77,6 +88,32 @@ namespace ConsoleApp.Maps
return inRange;
}
+ public List GetPassableNeighbors(ICell cell) =>
+ GetNeighbors(cell).Where(neighbor => !neighbor.Blocked).Cast().ToList();
+
+
+ private static int ComputeHScore(ICell src, Cell dest)
+ {
+ return Math.Abs(dest.X - src.X) + Math.Abs(dest.Y - src.Y);
+ }
+
+
+ public List GetNeighbors(ICell cell)
+ {
+ var rlist = new List();
+ var rowOperations = new int[] { -1, 0, 0, 1};
+ var colOperations = new int[] {0, -1, 1, 0};
+ for (var i = 0; i < 4; i++)
+ {
+ var curCell = GetCell(cell.X + rowOperations[i], cell.Y + colOperations[i]);
+ if (curCell != default)
+ {
+ rlist.Add(curCell);
+ }
+ }
+ return rlist;
+ }
+
private Cell GetTopCellInBoundingBox(int cx, int cy, int radius)
{
int topX, topY;
@@ -91,16 +128,21 @@ namespace ConsoleApp.Maps
private Cell GetBottomCellInBoundingBox(int cx, int cy, int radius)
{
int bottomX, bottomY;
- if (cy - radius > 0) bottomY = 0;
+ if (cy - radius < 0) bottomY = 0;
else
bottomY = cy - radius;
- if (cx + radius < Width) bottomX = Width;
+ if (cx + radius > Width) bottomX = Width;
else
bottomX = cx + radius;
return Map[bottomX, bottomY];
}
- public Cell GetCell(int x, int y) => Map[x, y];
+ public Cell GetCell(int x, int y)
+ {
+ if (x > Width || y > Height || x < 0 || y < 0)
+ return default;
+ return Map[x, y];
+ }
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Output 2.zip b/ConsoleApp/Output 2.zip
new file mode 100644
index 0000000..77fcc45
Binary files /dev/null and b/ConsoleApp/Output 2.zip differ
diff --git a/ConsoleApp/Output.zip b/ConsoleApp/Output.zip
new file mode 100644
index 0000000..af121f2
Binary files /dev/null and b/ConsoleApp/Output.zip differ
diff --git a/ConsoleApp/Output/Data.txt b/ConsoleApp/Output/Data.txt
index a3ad04a..0436bc9 100644
--- a/ConsoleApp/Output/Data.txt
+++ b/ConsoleApp/Output/Data.txt
@@ -1,7 +1,14 @@
General:
- Total Mines: 23
+ Total Mines: 36
Hex:
- Total Moves: 927
- Bombs Found: 23
- Cleared Cell Count: 2295
+ Total Moves: 687
+ Bombs Found: 35
+ Cleared Cell Count: 3591
Uncleared Cell Count: 9
+ Percentage Cleared: 99.75
+Square:
+ Total Moves: 1045
+ Bombs Found: 34
+ Cleared Cell Count: 3251
+ Uncleared Cell Count: 349
+ Percentage Cleared: 90.30555555555554
diff --git a/ConsoleApp/Output/HexCoverage.png b/ConsoleApp/Output/HexCoverage.png
new file mode 100644
index 0000000..73ea623
Binary files /dev/null and b/ConsoleApp/Output/HexCoverage.png differ
diff --git a/ConsoleApp/Output/HexCoveredCells.txt b/ConsoleApp/Output/HexCoveredCells.txt
new file mode 100644
index 0000000..8ae0eaa
--- /dev/null
+++ b/ConsoleApp/Output/HexCoveredCells.txt
@@ -0,0 +1,3591 @@
+0 0
+0 1
+0 2
+0 3
+0 4
+0 5
+0 6
+0 7
+0 8
+0 9
+0 10
+0 11
+0 12
+0 13
+0 14
+0 15
+0 16
+0 17
+0 18
+0 19
+0 20
+0 21
+0 22
+0 23
+0 24
+0 25
+0 26
+0 27
+0 28
+0 29
+0 30
+0 31
+0 32
+0 33
+0 34
+0 35
+0 36
+0 37
+0 38
+0 39
+0 40
+0 41
+0 42
+0 43
+0 44
+0 45
+0 46
+0 47
+0 48
+0 49
+0 50
+0 51
+0 52
+0 53
+0 54
+0 55
+0 56
+0 57
+0 58
+0 59
+1 0
+1 1
+1 2
+1 3
+1 4
+1 5
+1 6
+1 7
+1 8
+1 9
+1 10
+1 11
+1 12
+1 13
+1 14
+1 15
+1 16
+1 17
+1 18
+1 19
+1 20
+1 21
+1 22
+1 23
+1 24
+1 25
+1 26
+1 27
+1 28
+1 29
+1 30
+1 31
+1 32
+1 33
+1 34
+1 35
+1 36
+1 37
+1 38
+1 39
+1 40
+1 41
+1 42
+1 43
+1 44
+1 45
+1 46
+1 47
+1 48
+1 49
+1 50
+1 51
+1 52
+1 53
+1 54
+1 55
+1 56
+1 57
+1 58
+1 59
+2 0
+2 1
+2 2
+2 3
+2 4
+2 5
+2 6
+2 7
+2 8
+2 9
+2 10
+2 11
+2 12
+2 13
+2 14
+2 15
+2 16
+2 17
+2 18
+2 19
+2 20
+2 21
+2 22
+2 23
+2 24
+2 25
+2 26
+2 27
+2 28
+2 29
+2 30
+2 31
+2 32
+2 33
+2 34
+2 35
+2 36
+2 37
+2 38
+2 39
+2 40
+2 41
+2 42
+2 43
+2 44
+2 45
+2 46
+2 47
+2 48
+2 49
+2 50
+2 51
+2 52
+2 53
+2 54
+2 55
+2 56
+2 57
+2 58
+2 59
+3 0
+3 1
+3 2
+3 3
+3 4
+3 5
+3 6
+3 7
+3 8
+3 9
+3 10
+3 11
+3 12
+3 13
+3 14
+3 15
+3 16
+3 17
+3 18
+3 19
+3 20
+3 21
+3 22
+3 23
+3 24
+3 25
+3 26
+3 27
+3 28
+3 29
+3 30
+3 31
+3 32
+3 33
+3 34
+3 35
+3 36
+3 37
+3 38
+3 39
+3 40
+3 41
+3 42
+3 43
+3 44
+3 45
+3 46
+3 47
+3 48
+3 49
+3 50
+3 51
+3 52
+3 53
+3 54
+3 55
+3 56
+3 57
+3 58
+3 59
+4 0
+4 1
+4 2
+4 3
+4 4
+4 5
+4 6
+4 7
+4 8
+4 9
+4 10
+4 11
+4 12
+4 13
+4 14
+4 15
+4 16
+4 17
+4 18
+4 19
+4 20
+4 21
+4 22
+4 23
+4 24
+4 25
+4 26
+4 27
+4 28
+4 29
+4 30
+4 31
+4 32
+4 33
+4 34
+4 35
+4 36
+4 37
+4 38
+4 39
+4 40
+4 41
+4 42
+4 43
+4 44
+4 45
+4 46
+4 47
+4 48
+4 49
+4 50
+4 51
+4 52
+4 53
+4 54
+4 55
+4 56
+4 57
+4 58
+4 59
+5 0
+5 1
+5 2
+5 3
+5 4
+5 5
+5 6
+5 7
+5 8
+5 9
+5 10
+5 11
+5 12
+5 13
+5 14
+5 15
+5 16
+5 17
+5 18
+5 19
+5 20
+5 21
+5 22
+5 23
+5 24
+5 25
+5 26
+5 27
+5 28
+5 29
+5 30
+5 31
+5 32
+5 33
+5 34
+5 35
+5 36
+5 37
+5 38
+5 39
+5 40
+5 41
+5 42
+5 43
+5 44
+5 45
+5 46
+5 47
+5 48
+5 49
+5 50
+5 51
+5 52
+5 53
+5 54
+5 55
+5 56
+5 57
+5 58
+5 59
+6 0
+6 1
+6 2
+6 3
+6 4
+6 5
+6 6
+6 7
+6 8
+6 9
+6 10
+6 11
+6 12
+6 13
+6 14
+6 15
+6 16
+6 17
+6 18
+6 19
+6 20
+6 21
+6 22
+6 23
+6 24
+6 25
+6 26
+6 27
+6 28
+6 29
+6 30
+6 31
+6 32
+6 33
+6 34
+6 35
+6 36
+6 37
+6 38
+6 39
+6 40
+6 41
+6 42
+6 43
+6 44
+6 45
+6 46
+6 47
+6 48
+6 49
+6 50
+6 51
+6 52
+6 53
+6 54
+6 55
+6 56
+6 57
+6 58
+6 59
+7 0
+7 1
+7 2
+7 3
+7 4
+7 5
+7 6
+7 7
+7 8
+7 9
+7 10
+7 11
+7 12
+7 13
+7 14
+7 15
+7 16
+7 17
+7 18
+7 19
+7 20
+7 21
+7 22
+7 23
+7 24
+7 25
+7 26
+7 27
+7 28
+7 29
+7 30
+7 31
+7 32
+7 33
+7 34
+7 35
+7 36
+7 37
+7 38
+7 39
+7 40
+7 41
+7 42
+7 43
+7 44
+7 45
+7 46
+7 47
+7 48
+7 49
+7 50
+7 51
+7 52
+7 53
+7 54
+7 55
+7 56
+7 57
+7 58
+7 59
+8 0
+8 1
+8 2
+8 3
+8 4
+8 5
+8 6
+8 7
+8 8
+8 9
+8 10
+8 11
+8 12
+8 13
+8 14
+8 15
+8 16
+8 17
+8 18
+8 19
+8 20
+8 21
+8 22
+8 23
+8 24
+8 25
+8 26
+8 27
+8 28
+8 29
+8 30
+8 31
+8 32
+8 33
+8 34
+8 35
+8 36
+8 37
+8 38
+8 39
+8 40
+8 41
+8 42
+8 43
+8 44
+8 45
+8 46
+8 47
+8 48
+8 49
+8 50
+8 51
+8 52
+8 53
+8 54
+8 55
+8 56
+8 57
+8 58
+8 59
+9 0
+9 1
+9 2
+9 3
+9 4
+9 5
+9 6
+9 7
+9 8
+9 9
+9 10
+9 11
+9 12
+9 13
+9 14
+9 15
+9 16
+9 17
+9 18
+9 19
+9 20
+9 21
+9 22
+9 23
+9 24
+9 25
+9 26
+9 27
+9 28
+9 29
+9 30
+9 31
+9 32
+9 33
+9 34
+9 35
+9 36
+9 37
+9 38
+9 39
+9 40
+9 41
+9 42
+9 43
+9 44
+9 45
+9 46
+9 47
+9 48
+9 49
+9 50
+9 51
+9 52
+9 53
+9 54
+9 55
+9 56
+9 57
+9 58
+9 59
+10 0
+10 1
+10 2
+10 3
+10 4
+10 5
+10 6
+10 7
+10 8
+10 9
+10 10
+10 11
+10 12
+10 13
+10 14
+10 15
+10 16
+10 17
+10 18
+10 19
+10 20
+10 21
+10 22
+10 23
+10 24
+10 25
+10 26
+10 27
+10 28
+10 29
+10 30
+10 31
+10 32
+10 33
+10 34
+10 35
+10 36
+10 37
+10 38
+10 39
+10 40
+10 41
+10 42
+10 43
+10 44
+10 45
+10 46
+10 47
+10 48
+10 49
+10 50
+10 51
+10 52
+10 53
+10 54
+10 55
+10 56
+10 57
+10 58
+10 59
+11 0
+11 1
+11 2
+11 3
+11 4
+11 5
+11 6
+11 7
+11 8
+11 9
+11 10
+11 11
+11 12
+11 13
+11 14
+11 15
+11 16
+11 17
+11 18
+11 19
+11 20
+11 21
+11 22
+11 23
+11 24
+11 25
+11 26
+11 27
+11 28
+11 29
+11 30
+11 31
+11 32
+11 33
+11 34
+11 35
+11 36
+11 37
+11 38
+11 39
+11 40
+11 41
+11 42
+11 43
+11 44
+11 45
+11 46
+11 47
+11 48
+11 49
+11 50
+11 51
+11 52
+11 53
+11 54
+11 55
+11 56
+11 57
+11 58
+11 59
+12 0
+12 1
+12 2
+12 3
+12 4
+12 5
+12 6
+12 7
+12 8
+12 9
+12 10
+12 11
+12 12
+12 13
+12 14
+12 15
+12 16
+12 17
+12 18
+12 19
+12 20
+12 21
+12 22
+12 23
+12 24
+12 25
+12 26
+12 27
+12 28
+12 29
+12 30
+12 31
+12 32
+12 33
+12 34
+12 35
+12 36
+12 37
+12 38
+12 39
+12 40
+12 41
+12 42
+12 43
+12 44
+12 45
+12 46
+12 47
+12 48
+12 49
+12 50
+12 51
+12 52
+12 53
+12 54
+12 55
+12 56
+12 57
+12 58
+12 59
+13 0
+13 1
+13 2
+13 3
+13 4
+13 5
+13 6
+13 7
+13 8
+13 9
+13 10
+13 11
+13 12
+13 13
+13 14
+13 15
+13 16
+13 17
+13 18
+13 19
+13 20
+13 21
+13 22
+13 23
+13 24
+13 25
+13 26
+13 27
+13 28
+13 29
+13 30
+13 31
+13 32
+13 33
+13 34
+13 35
+13 36
+13 37
+13 38
+13 39
+13 40
+13 41
+13 42
+13 43
+13 44
+13 45
+13 46
+13 47
+13 48
+13 49
+13 50
+13 51
+13 52
+13 53
+13 54
+13 55
+13 56
+13 57
+13 58
+13 59
+14 0
+14 1
+14 2
+14 3
+14 4
+14 5
+14 6
+14 7
+14 8
+14 9
+14 10
+14 11
+14 12
+14 13
+14 14
+14 15
+14 16
+14 17
+14 18
+14 19
+14 20
+14 21
+14 22
+14 23
+14 24
+14 25
+14 26
+14 27
+14 28
+14 29
+14 30
+14 31
+14 32
+14 33
+14 34
+14 35
+14 36
+14 37
+14 38
+14 39
+14 40
+14 41
+14 42
+14 43
+14 44
+14 45
+14 46
+14 47
+14 48
+14 49
+14 50
+14 51
+14 52
+14 53
+14 54
+14 55
+14 56
+14 57
+14 58
+14 59
+15 0
+15 1
+15 2
+15 3
+15 4
+15 5
+15 6
+15 7
+15 8
+15 9
+15 10
+15 11
+15 12
+15 13
+15 14
+15 15
+15 16
+15 17
+15 18
+15 19
+15 20
+15 21
+15 22
+15 23
+15 24
+15 25
+15 26
+15 27
+15 28
+15 29
+15 30
+15 31
+15 32
+15 33
+15 34
+15 35
+15 36
+15 37
+15 38
+15 39
+15 40
+15 41
+15 42
+15 43
+15 44
+15 45
+15 46
+15 47
+15 48
+15 49
+15 50
+15 51
+15 52
+15 53
+15 54
+15 55
+15 56
+15 57
+15 58
+15 59
+16 0
+16 1
+16 2
+16 3
+16 4
+16 5
+16 6
+16 7
+16 8
+16 9
+16 10
+16 11
+16 12
+16 13
+16 14
+16 15
+16 16
+16 17
+16 18
+16 19
+16 20
+16 21
+16 22
+16 23
+16 24
+16 25
+16 26
+16 27
+16 28
+16 29
+16 30
+16 31
+16 32
+16 33
+16 34
+16 35
+16 36
+16 37
+16 38
+16 39
+16 40
+16 41
+16 42
+16 43
+16 44
+16 45
+16 46
+16 47
+16 48
+16 49
+16 50
+16 51
+16 52
+16 53
+16 54
+16 55
+16 56
+16 57
+16 58
+16 59
+17 0
+17 1
+17 2
+17 3
+17 4
+17 5
+17 6
+17 7
+17 8
+17 9
+17 10
+17 11
+17 12
+17 13
+17 14
+17 15
+17 16
+17 17
+17 18
+17 19
+17 20
+17 21
+17 22
+17 23
+17 24
+17 25
+17 26
+17 27
+17 28
+17 29
+17 30
+17 31
+17 32
+17 33
+17 34
+17 35
+17 36
+17 37
+17 38
+17 39
+17 40
+17 41
+17 42
+17 43
+17 44
+17 45
+17 46
+17 47
+17 48
+17 49
+17 50
+17 51
+17 52
+17 53
+17 54
+17 55
+17 56
+17 57
+17 58
+17 59
+18 0
+18 1
+18 2
+18 3
+18 4
+18 5
+18 6
+18 7
+18 8
+18 9
+18 10
+18 11
+18 12
+18 13
+18 14
+18 15
+18 16
+18 17
+18 18
+18 19
+18 20
+18 21
+18 22
+18 23
+18 24
+18 25
+18 26
+18 27
+18 28
+18 29
+18 30
+18 31
+18 32
+18 33
+18 34
+18 35
+18 36
+18 37
+18 38
+18 39
+18 40
+18 41
+18 42
+18 43
+18 44
+18 45
+18 46
+18 47
+18 48
+18 49
+18 50
+18 51
+18 52
+18 53
+18 54
+18 55
+18 56
+18 57
+18 58
+18 59
+19 0
+19 1
+19 2
+19 3
+19 4
+19 5
+19 6
+19 7
+19 8
+19 9
+19 10
+19 11
+19 12
+19 13
+19 14
+19 15
+19 16
+19 17
+19 18
+19 19
+19 20
+19 21
+19 22
+19 23
+19 24
+19 25
+19 26
+19 27
+19 28
+19 29
+19 30
+19 31
+19 32
+19 33
+19 34
+19 35
+19 36
+19 37
+19 38
+19 39
+19 40
+19 41
+19 42
+19 43
+19 44
+19 45
+19 46
+19 47
+19 48
+19 49
+19 50
+19 51
+19 52
+19 53
+19 54
+19 55
+19 56
+19 57
+19 58
+19 59
+20 0
+20 1
+20 2
+20 3
+20 4
+20 5
+20 6
+20 7
+20 8
+20 9
+20 10
+20 11
+20 12
+20 13
+20 14
+20 15
+20 16
+20 17
+20 18
+20 19
+20 20
+20 21
+20 22
+20 23
+20 24
+20 25
+20 26
+20 27
+20 28
+20 29
+20 30
+20 31
+20 32
+20 33
+20 34
+20 35
+20 36
+20 37
+20 38
+20 39
+20 40
+20 41
+20 42
+20 43
+20 44
+20 45
+20 46
+20 47
+20 48
+20 49
+20 50
+20 51
+20 52
+20 53
+20 54
+20 55
+20 56
+20 57
+20 58
+20 59
+21 0
+21 1
+21 2
+21 3
+21 4
+21 5
+21 6
+21 7
+21 8
+21 9
+21 10
+21 11
+21 12
+21 13
+21 14
+21 15
+21 16
+21 17
+21 18
+21 19
+21 20
+21 21
+21 22
+21 23
+21 24
+21 25
+21 26
+21 27
+21 28
+21 29
+21 30
+21 31
+21 32
+21 33
+21 34
+21 35
+21 36
+21 37
+21 38
+21 39
+21 40
+21 41
+21 42
+21 43
+21 44
+21 45
+21 46
+21 47
+21 48
+21 49
+21 50
+21 51
+21 52
+21 53
+21 54
+21 55
+21 56
+21 57
+21 58
+21 59
+22 0
+22 1
+22 2
+22 3
+22 4
+22 5
+22 6
+22 7
+22 8
+22 9
+22 10
+22 11
+22 12
+22 13
+22 14
+22 15
+22 16
+22 17
+22 18
+22 19
+22 20
+22 21
+22 22
+22 23
+22 24
+22 25
+22 26
+22 27
+22 28
+22 29
+22 30
+22 31
+22 32
+22 33
+22 34
+22 35
+22 36
+22 37
+22 38
+22 39
+22 40
+22 41
+22 42
+22 43
+22 44
+22 45
+22 46
+22 47
+22 48
+22 49
+22 50
+22 51
+22 52
+22 53
+22 54
+22 55
+22 56
+22 57
+22 58
+22 59
+23 0
+23 1
+23 2
+23 3
+23 4
+23 5
+23 6
+23 7
+23 8
+23 9
+23 10
+23 11
+23 12
+23 13
+23 14
+23 15
+23 16
+23 17
+23 18
+23 19
+23 20
+23 21
+23 22
+23 23
+23 24
+23 25
+23 26
+23 27
+23 28
+23 29
+23 30
+23 31
+23 32
+23 33
+23 34
+23 35
+23 36
+23 37
+23 38
+23 39
+23 40
+23 41
+23 42
+23 43
+23 44
+23 45
+23 46
+23 47
+23 48
+23 49
+23 50
+23 51
+23 52
+23 53
+23 54
+23 55
+23 56
+23 57
+23 58
+23 59
+24 0
+24 1
+24 2
+24 3
+24 4
+24 5
+24 6
+24 7
+24 8
+24 9
+24 10
+24 11
+24 12
+24 13
+24 14
+24 15
+24 16
+24 17
+24 18
+24 19
+24 20
+24 21
+24 22
+24 23
+24 24
+24 25
+24 26
+24 27
+24 28
+24 29
+24 30
+24 31
+24 32
+24 33
+24 34
+24 35
+24 36
+24 37
+24 38
+24 39
+24 40
+24 41
+24 42
+24 43
+24 44
+24 45
+24 46
+24 47
+24 48
+24 49
+24 50
+24 51
+24 52
+24 53
+24 54
+24 55
+24 56
+24 57
+24 58
+24 59
+25 0
+25 1
+25 2
+25 3
+25 4
+25 5
+25 6
+25 7
+25 8
+25 9
+25 10
+25 11
+25 12
+25 13
+25 14
+25 15
+25 16
+25 17
+25 18
+25 19
+25 20
+25 21
+25 22
+25 23
+25 24
+25 25
+25 26
+25 27
+25 28
+25 29
+25 30
+25 31
+25 32
+25 33
+25 34
+25 35
+25 36
+25 37
+25 38
+25 39
+25 40
+25 41
+25 42
+25 43
+25 44
+25 45
+25 46
+25 47
+25 48
+25 49
+25 50
+25 51
+25 52
+25 53
+25 54
+25 55
+25 56
+25 57
+25 58
+25 59
+26 0
+26 1
+26 2
+26 3
+26 4
+26 5
+26 6
+26 7
+26 8
+26 9
+26 10
+26 11
+26 12
+26 13
+26 14
+26 15
+26 16
+26 17
+26 18
+26 19
+26 20
+26 21
+26 22
+26 23
+26 24
+26 25
+26 26
+26 27
+26 28
+26 29
+26 30
+26 31
+26 32
+26 33
+26 34
+26 35
+26 36
+26 37
+26 38
+26 39
+26 40
+26 41
+26 42
+26 43
+26 44
+26 45
+26 46
+26 47
+26 48
+26 49
+26 50
+26 51
+26 52
+26 53
+26 54
+26 55
+26 56
+26 57
+26 58
+26 59
+27 0
+27 1
+27 2
+27 3
+27 4
+27 5
+27 6
+27 7
+27 8
+27 9
+27 10
+27 11
+27 12
+27 13
+27 14
+27 15
+27 16
+27 17
+27 18
+27 19
+27 20
+27 21
+27 22
+27 23
+27 24
+27 25
+27 26
+27 27
+27 28
+27 29
+27 30
+27 31
+27 32
+27 33
+27 34
+27 35
+27 36
+27 37
+27 38
+27 39
+27 40
+27 41
+27 42
+27 43
+27 44
+27 45
+27 46
+27 47
+27 48
+27 49
+27 50
+27 51
+27 52
+27 53
+27 54
+27 55
+27 56
+27 57
+27 58
+27 59
+28 0
+28 1
+28 2
+28 3
+28 4
+28 5
+28 6
+28 7
+28 8
+28 9
+28 10
+28 11
+28 12
+28 13
+28 14
+28 15
+28 16
+28 17
+28 18
+28 19
+28 20
+28 21
+28 22
+28 23
+28 24
+28 25
+28 26
+28 27
+28 28
+28 29
+28 30
+28 31
+28 32
+28 33
+28 34
+28 35
+28 36
+28 37
+28 38
+28 39
+28 40
+28 41
+28 42
+28 43
+28 44
+28 45
+28 46
+28 47
+28 52
+28 53
+28 54
+28 55
+28 56
+28 57
+28 58
+28 59
+29 0
+29 1
+29 2
+29 3
+29 4
+29 5
+29 6
+29 7
+29 8
+29 9
+29 10
+29 11
+29 12
+29 13
+29 14
+29 15
+29 16
+29 17
+29 18
+29 19
+29 20
+29 21
+29 22
+29 23
+29 24
+29 25
+29 26
+29 27
+29 28
+29 29
+29 30
+29 31
+29 32
+29 33
+29 34
+29 35
+29 36
+29 37
+29 38
+29 39
+29 40
+29 41
+29 42
+29 43
+29 44
+29 45
+29 46
+29 47
+29 48
+29 49
+29 51
+29 52
+29 53
+29 54
+29 55
+29 56
+29 57
+29 58
+29 59
+30 0
+30 1
+30 2
+30 3
+30 4
+30 5
+30 6
+30 7
+30 8
+30 9
+30 10
+30 11
+30 12
+30 13
+30 14
+30 15
+30 16
+30 17
+30 18
+30 19
+30 20
+30 21
+30 22
+30 23
+30 24
+30 25
+30 26
+30 27
+30 28
+30 29
+30 30
+30 31
+30 32
+30 33
+30 34
+30 35
+30 36
+30 37
+30 38
+30 39
+30 40
+30 41
+30 42
+30 43
+30 44
+30 45
+30 46
+30 47
+30 48
+30 49
+30 50
+30 51
+30 52
+30 53
+30 54
+30 55
+30 56
+30 57
+30 58
+30 59
+31 0
+31 1
+31 2
+31 3
+31 4
+31 5
+31 6
+31 7
+31 8
+31 9
+31 10
+31 11
+31 12
+31 13
+31 14
+31 15
+31 16
+31 17
+31 18
+31 19
+31 20
+31 21
+31 22
+31 23
+31 24
+31 25
+31 26
+31 27
+31 28
+31 29
+31 30
+31 31
+31 32
+31 33
+31 34
+31 35
+31 36
+31 37
+31 38
+31 39
+31 40
+31 41
+31 42
+31 43
+31 44
+31 45
+31 46
+31 47
+31 48
+31 49
+31 50
+31 51
+31 52
+31 53
+31 54
+31 55
+31 56
+31 57
+31 58
+31 59
+32 0
+32 1
+32 2
+32 3
+32 4
+32 5
+32 6
+32 7
+32 8
+32 9
+32 10
+32 11
+32 13
+32 14
+32 15
+32 16
+32 17
+32 18
+32 19
+32 20
+32 21
+32 22
+32 23
+32 24
+32 25
+32 26
+32 27
+32 28
+32 29
+32 30
+32 31
+32 32
+32 33
+32 34
+32 35
+32 36
+32 37
+32 38
+32 39
+32 40
+32 41
+32 42
+32 43
+32 44
+32 45
+32 46
+32 47
+32 48
+32 49
+32 50
+32 51
+32 52
+32 53
+32 54
+32 55
+32 56
+32 57
+32 58
+32 59
+33 0
+33 1
+33 2
+33 3
+33 4
+33 5
+33 6
+33 7
+33 8
+33 9
+33 10
+33 11
+33 13
+33 14
+33 15
+33 16
+33 17
+33 18
+33 19
+33 20
+33 21
+33 22
+33 23
+33 24
+33 25
+33 26
+33 27
+33 28
+33 29
+33 30
+33 31
+33 32
+33 33
+33 34
+33 35
+33 36
+33 37
+33 38
+33 39
+33 40
+33 41
+33 42
+33 43
+33 44
+33 45
+33 46
+33 47
+33 48
+33 49
+33 50
+33 51
+33 52
+33 53
+33 54
+33 55
+33 56
+33 57
+33 58
+33 59
+34 0
+34 1
+34 2
+34 3
+34 4
+34 5
+34 6
+34 7
+34 8
+34 9
+34 10
+34 11
+34 13
+34 14
+34 15
+34 16
+34 17
+34 18
+34 19
+34 20
+34 21
+34 22
+34 23
+34 24
+34 25
+34 26
+34 27
+34 28
+34 29
+34 30
+34 31
+34 32
+34 33
+34 34
+34 35
+34 36
+34 37
+34 38
+34 39
+34 40
+34 41
+34 42
+34 43
+34 44
+34 45
+34 46
+34 47
+34 48
+34 49
+34 50
+34 51
+34 52
+34 53
+34 54
+34 55
+34 56
+34 57
+34 58
+34 59
+35 0
+35 1
+35 2
+35 3
+35 4
+35 5
+35 6
+35 7
+35 8
+35 9
+35 10
+35 11
+35 13
+35 14
+35 15
+35 16
+35 17
+35 18
+35 19
+35 20
+35 21
+35 22
+35 23
+35 24
+35 25
+35 26
+35 27
+35 28
+35 29
+35 30
+35 31
+35 32
+35 33
+35 34
+35 35
+35 36
+35 37
+35 38
+35 39
+35 40
+35 41
+35 42
+35 43
+35 44
+35 45
+35 46
+35 47
+35 48
+35 49
+35 50
+35 51
+35 52
+35 53
+35 54
+35 55
+35 56
+35 57
+35 58
+35 59
+36 0
+36 1
+36 2
+36 3
+36 4
+36 5
+36 6
+36 7
+36 8
+36 9
+36 10
+36 11
+36 12
+36 13
+36 14
+36 15
+36 16
+36 17
+36 18
+36 19
+36 20
+36 21
+36 22
+36 23
+36 24
+36 25
+36 26
+36 27
+36 28
+36 29
+36 30
+36 31
+36 32
+36 33
+36 34
+36 35
+36 36
+36 37
+36 38
+36 39
+36 40
+36 41
+36 42
+36 43
+36 44
+36 45
+36 46
+36 47
+36 48
+36 49
+36 50
+36 51
+36 52
+36 53
+36 54
+36 55
+36 56
+36 57
+36 58
+36 59
+37 0
+37 1
+37 2
+37 3
+37 4
+37 5
+37 6
+37 7
+37 8
+37 9
+37 10
+37 11
+37 12
+37 13
+37 14
+37 15
+37 16
+37 17
+37 18
+37 19
+37 20
+37 21
+37 22
+37 23
+37 24
+37 25
+37 26
+37 27
+37 28
+37 29
+37 30
+37 31
+37 32
+37 33
+37 34
+37 35
+37 36
+37 37
+37 38
+37 39
+37 40
+37 41
+37 42
+37 43
+37 44
+37 45
+37 46
+37 47
+37 48
+37 49
+37 50
+37 51
+37 52
+37 53
+37 54
+37 55
+37 56
+37 57
+37 58
+37 59
+38 0
+38 1
+38 2
+38 3
+38 4
+38 5
+38 6
+38 7
+38 8
+38 9
+38 10
+38 11
+38 12
+38 13
+38 14
+38 15
+38 16
+38 17
+38 18
+38 19
+38 20
+38 21
+38 22
+38 23
+38 24
+38 25
+38 26
+38 27
+38 28
+38 29
+38 30
+38 31
+38 32
+38 33
+38 34
+38 35
+38 36
+38 37
+38 38
+38 39
+38 40
+38 41
+38 42
+38 43
+38 44
+38 45
+38 46
+38 47
+38 48
+38 49
+38 50
+38 51
+38 52
+38 53
+38 54
+38 55
+38 56
+38 57
+38 58
+38 59
+39 0
+39 1
+39 2
+39 3
+39 4
+39 5
+39 6
+39 7
+39 8
+39 9
+39 10
+39 11
+39 12
+39 13
+39 14
+39 15
+39 16
+39 17
+39 18
+39 19
+39 20
+39 21
+39 22
+39 23
+39 24
+39 25
+39 26
+39 27
+39 28
+39 29
+39 30
+39 31
+39 32
+39 33
+39 34
+39 35
+39 36
+39 37
+39 38
+39 39
+39 40
+39 41
+39 42
+39 43
+39 44
+39 45
+39 46
+39 47
+39 48
+39 49
+39 50
+39 51
+39 52
+39 53
+39 54
+39 55
+39 56
+39 57
+39 58
+39 59
+40 0
+40 1
+40 2
+40 3
+40 4
+40 5
+40 6
+40 7
+40 8
+40 9
+40 10
+40 11
+40 12
+40 13
+40 14
+40 15
+40 16
+40 17
+40 18
+40 19
+40 20
+40 21
+40 22
+40 23
+40 24
+40 25
+40 26
+40 27
+40 28
+40 29
+40 30
+40 31
+40 32
+40 33
+40 34
+40 35
+40 36
+40 37
+40 38
+40 39
+40 40
+40 41
+40 42
+40 43
+40 44
+40 45
+40 46
+40 47
+40 48
+40 49
+40 50
+40 51
+40 52
+40 53
+40 54
+40 55
+40 56
+40 57
+40 58
+40 59
+41 0
+41 1
+41 2
+41 3
+41 4
+41 5
+41 6
+41 7
+41 8
+41 9
+41 10
+41 11
+41 12
+41 13
+41 14
+41 15
+41 16
+41 17
+41 18
+41 19
+41 20
+41 21
+41 22
+41 23
+41 24
+41 25
+41 26
+41 27
+41 28
+41 29
+41 30
+41 31
+41 32
+41 33
+41 34
+41 35
+41 36
+41 37
+41 38
+41 39
+41 40
+41 41
+41 42
+41 43
+41 44
+41 45
+41 46
+41 47
+41 48
+41 49
+41 50
+41 51
+41 52
+41 53
+41 54
+41 55
+41 56
+41 57
+41 58
+41 59
+42 0
+42 1
+42 2
+42 3
+42 4
+42 5
+42 6
+42 7
+42 8
+42 9
+42 10
+42 11
+42 12
+42 13
+42 14
+42 15
+42 16
+42 17
+42 18
+42 19
+42 20
+42 21
+42 22
+42 23
+42 24
+42 25
+42 26
+42 27
+42 28
+42 29
+42 30
+42 31
+42 32
+42 33
+42 34
+42 35
+42 36
+42 37
+42 38
+42 39
+42 40
+42 41
+42 42
+42 43
+42 44
+42 45
+42 46
+42 47
+42 48
+42 49
+42 50
+42 51
+42 52
+42 53
+42 54
+42 55
+42 56
+42 57
+42 58
+42 59
+43 0
+43 1
+43 2
+43 3
+43 4
+43 5
+43 6
+43 7
+43 8
+43 9
+43 10
+43 11
+43 12
+43 13
+43 14
+43 15
+43 16
+43 17
+43 18
+43 19
+43 20
+43 21
+43 22
+43 23
+43 24
+43 25
+43 26
+43 27
+43 28
+43 29
+43 30
+43 31
+43 32
+43 33
+43 34
+43 35
+43 36
+43 37
+43 38
+43 39
+43 40
+43 41
+43 42
+43 43
+43 44
+43 45
+43 46
+43 47
+43 48
+43 49
+43 50
+43 51
+43 52
+43 53
+43 54
+43 55
+43 56
+43 57
+43 58
+43 59
+44 0
+44 1
+44 2
+44 3
+44 4
+44 5
+44 6
+44 7
+44 8
+44 9
+44 10
+44 11
+44 12
+44 13
+44 14
+44 15
+44 16
+44 17
+44 18
+44 19
+44 20
+44 21
+44 22
+44 23
+44 24
+44 25
+44 26
+44 27
+44 28
+44 29
+44 30
+44 31
+44 32
+44 33
+44 34
+44 35
+44 36
+44 37
+44 38
+44 39
+44 40
+44 41
+44 42
+44 43
+44 44
+44 45
+44 46
+44 47
+44 48
+44 49
+44 50
+44 51
+44 52
+44 53
+44 54
+44 55
+44 56
+44 57
+44 58
+44 59
+45 0
+45 1
+45 2
+45 3
+45 4
+45 5
+45 6
+45 7
+45 8
+45 9
+45 10
+45 11
+45 12
+45 13
+45 14
+45 15
+45 16
+45 17
+45 18
+45 19
+45 20
+45 21
+45 22
+45 23
+45 24
+45 25
+45 26
+45 27
+45 28
+45 29
+45 30
+45 31
+45 32
+45 33
+45 34
+45 35
+45 36
+45 37
+45 38
+45 39
+45 40
+45 41
+45 42
+45 43
+45 44
+45 45
+45 46
+45 47
+45 48
+45 49
+45 50
+45 51
+45 52
+45 53
+45 54
+45 55
+45 56
+45 57
+45 58
+45 59
+46 0
+46 1
+46 2
+46 3
+46 4
+46 5
+46 6
+46 7
+46 8
+46 9
+46 10
+46 11
+46 12
+46 13
+46 14
+46 15
+46 16
+46 17
+46 18
+46 19
+46 20
+46 21
+46 22
+46 23
+46 24
+46 25
+46 26
+46 27
+46 28
+46 29
+46 30
+46 31
+46 32
+46 33
+46 34
+46 35
+46 36
+46 37
+46 38
+46 39
+46 40
+46 41
+46 42
+46 43
+46 44
+46 45
+46 46
+46 47
+46 48
+46 49
+46 50
+46 51
+46 52
+46 53
+46 54
+46 55
+46 56
+46 57
+46 58
+46 59
+47 0
+47 1
+47 2
+47 3
+47 4
+47 5
+47 6
+47 7
+47 8
+47 9
+47 10
+47 11
+47 12
+47 13
+47 14
+47 15
+47 16
+47 17
+47 18
+47 19
+47 20
+47 21
+47 22
+47 23
+47 24
+47 25
+47 26
+47 27
+47 28
+47 29
+47 30
+47 31
+47 32
+47 33
+47 34
+47 35
+47 36
+47 37
+47 38
+47 39
+47 40
+47 41
+47 42
+47 43
+47 44
+47 45
+47 46
+47 47
+47 48
+47 49
+47 50
+47 51
+47 52
+47 53
+47 54
+47 55
+47 56
+47 57
+47 58
+47 59
+48 0
+48 1
+48 2
+48 3
+48 4
+48 5
+48 6
+48 7
+48 8
+48 9
+48 10
+48 11
+48 12
+48 13
+48 14
+48 15
+48 16
+48 17
+48 18
+48 19
+48 20
+48 21
+48 22
+48 23
+48 24
+48 25
+48 26
+48 27
+48 28
+48 29
+48 30
+48 31
+48 32
+48 33
+48 34
+48 35
+48 36
+48 37
+48 38
+48 39
+48 40
+48 41
+48 42
+48 43
+48 44
+48 45
+48 46
+48 47
+48 48
+48 49
+48 50
+48 51
+48 52
+48 53
+48 54
+48 55
+48 56
+48 57
+48 58
+48 59
+49 0
+49 1
+49 2
+49 3
+49 4
+49 5
+49 6
+49 7
+49 8
+49 9
+49 10
+49 11
+49 12
+49 13
+49 14
+49 15
+49 16
+49 17
+49 18
+49 19
+49 20
+49 21
+49 22
+49 23
+49 24
+49 25
+49 26
+49 27
+49 28
+49 29
+49 30
+49 31
+49 32
+49 33
+49 34
+49 35
+49 36
+49 37
+49 38
+49 39
+49 40
+49 41
+49 42
+49 43
+49 44
+49 45
+49 46
+49 47
+49 48
+49 49
+49 50
+49 51
+49 52
+49 53
+49 54
+49 55
+49 56
+49 57
+49 58
+49 59
+50 0
+50 1
+50 2
+50 3
+50 4
+50 5
+50 6
+50 7
+50 8
+50 9
+50 10
+50 11
+50 12
+50 13
+50 14
+50 15
+50 16
+50 17
+50 18
+50 19
+50 20
+50 21
+50 22
+50 23
+50 24
+50 25
+50 26
+50 27
+50 28
+50 29
+50 30
+50 31
+50 32
+50 33
+50 34
+50 35
+50 36
+50 37
+50 38
+50 39
+50 40
+50 41
+50 42
+50 43
+50 44
+50 45
+50 46
+50 47
+50 48
+50 49
+50 50
+50 51
+50 52
+50 53
+50 54
+50 55
+50 56
+50 57
+50 58
+50 59
+51 0
+51 1
+51 2
+51 3
+51 4
+51 5
+51 6
+51 7
+51 8
+51 9
+51 10
+51 11
+51 12
+51 13
+51 14
+51 15
+51 16
+51 17
+51 18
+51 19
+51 20
+51 21
+51 22
+51 23
+51 24
+51 25
+51 26
+51 27
+51 28
+51 29
+51 30
+51 31
+51 32
+51 33
+51 34
+51 35
+51 36
+51 37
+51 38
+51 39
+51 40
+51 41
+51 42
+51 43
+51 44
+51 45
+51 46
+51 47
+51 48
+51 49
+51 50
+51 51
+51 52
+51 53
+51 54
+51 55
+51 56
+51 57
+51 58
+51 59
+52 0
+52 1
+52 2
+52 3
+52 4
+52 5
+52 6
+52 7
+52 8
+52 9
+52 10
+52 11
+52 12
+52 13
+52 14
+52 15
+52 16
+52 17
+52 18
+52 19
+52 20
+52 21
+52 22
+52 23
+52 24
+52 25
+52 26
+52 27
+52 28
+52 29
+52 30
+52 31
+52 32
+52 33
+52 34
+52 35
+52 36
+52 37
+52 38
+52 39
+52 40
+52 41
+52 42
+52 43
+52 44
+52 45
+52 46
+52 47
+52 48
+52 49
+52 50
+52 51
+52 52
+52 53
+52 54
+52 55
+52 56
+52 57
+52 58
+52 59
+53 0
+53 1
+53 2
+53 3
+53 4
+53 5
+53 6
+53 7
+53 8
+53 9
+53 10
+53 11
+53 12
+53 13
+53 14
+53 15
+53 16
+53 17
+53 18
+53 19
+53 20
+53 21
+53 22
+53 23
+53 24
+53 25
+53 26
+53 27
+53 28
+53 29
+53 30
+53 31
+53 32
+53 33
+53 34
+53 35
+53 36
+53 37
+53 38
+53 39
+53 40
+53 41
+53 42
+53 43
+53 44
+53 45
+53 46
+53 47
+53 48
+53 49
+53 50
+53 51
+53 52
+53 53
+53 54
+53 55
+53 56
+53 57
+53 58
+53 59
+54 0
+54 1
+54 2
+54 3
+54 4
+54 5
+54 6
+54 7
+54 8
+54 9
+54 10
+54 11
+54 12
+54 13
+54 14
+54 15
+54 16
+54 17
+54 18
+54 19
+54 20
+54 21
+54 22
+54 23
+54 24
+54 25
+54 26
+54 27
+54 28
+54 29
+54 30
+54 31
+54 32
+54 33
+54 34
+54 35
+54 36
+54 37
+54 38
+54 39
+54 40
+54 41
+54 42
+54 43
+54 44
+54 45
+54 46
+54 47
+54 48
+54 49
+54 50
+54 51
+54 52
+54 53
+54 54
+54 55
+54 56
+54 57
+54 58
+54 59
+55 0
+55 1
+55 2
+55 3
+55 4
+55 5
+55 6
+55 7
+55 8
+55 9
+55 10
+55 11
+55 12
+55 13
+55 14
+55 15
+55 16
+55 17
+55 18
+55 19
+55 20
+55 21
+55 22
+55 23
+55 24
+55 25
+55 26
+55 27
+55 28
+55 29
+55 30
+55 31
+55 32
+55 33
+55 34
+55 35
+55 36
+55 37
+55 38
+55 39
+55 40
+55 41
+55 42
+55 43
+55 44
+55 45
+55 46
+55 47
+55 48
+55 49
+55 50
+55 51
+55 52
+55 53
+55 54
+55 55
+55 56
+55 57
+55 58
+55 59
+56 0
+56 1
+56 2
+56 3
+56 4
+56 5
+56 6
+56 7
+56 8
+56 9
+56 10
+56 11
+56 12
+56 13
+56 14
+56 15
+56 16
+56 17
+56 18
+56 19
+56 20
+56 21
+56 22
+56 23
+56 24
+56 25
+56 26
+56 27
+56 28
+56 29
+56 30
+56 31
+56 32
+56 33
+56 34
+56 35
+56 36
+56 37
+56 38
+56 39
+56 40
+56 41
+56 42
+56 43
+56 44
+56 45
+56 46
+56 47
+56 48
+56 49
+56 50
+56 51
+56 52
+56 53
+56 54
+56 55
+56 56
+56 57
+56 58
+56 59
+57 0
+57 1
+57 2
+57 3
+57 4
+57 5
+57 6
+57 7
+57 8
+57 9
+57 10
+57 11
+57 12
+57 13
+57 14
+57 15
+57 16
+57 17
+57 18
+57 19
+57 20
+57 21
+57 22
+57 23
+57 24
+57 25
+57 26
+57 27
+57 28
+57 29
+57 30
+57 31
+57 32
+57 33
+57 34
+57 35
+57 36
+57 37
+57 38
+57 39
+57 40
+57 41
+57 42
+57 43
+57 44
+57 45
+57 46
+57 47
+57 48
+57 49
+57 50
+57 51
+57 52
+57 53
+57 54
+57 55
+57 56
+57 57
+57 58
+57 59
+58 0
+58 1
+58 2
+58 3
+58 4
+58 5
+58 6
+58 7
+58 8
+58 9
+58 10
+58 11
+58 12
+58 13
+58 14
+58 15
+58 16
+58 17
+58 18
+58 19
+58 20
+58 21
+58 22
+58 23
+58 24
+58 25
+58 26
+58 27
+58 28
+58 29
+58 30
+58 31
+58 32
+58 33
+58 34
+58 35
+58 36
+58 37
+58 38
+58 39
+58 40
+58 41
+58 42
+58 43
+58 44
+58 45
+58 46
+58 47
+58 48
+58 49
+58 50
+58 51
+58 52
+58 53
+58 54
+58 55
+58 56
+58 57
+58 58
+58 59
+59 0
+59 1
+59 2
+59 3
+59 4
+59 5
+59 6
+59 7
+59 8
+59 9
+59 10
+59 11
+59 12
+59 13
+59 14
+59 15
+59 16
+59 17
+59 18
+59 19
+59 20
+59 21
+59 22
+59 23
+59 24
+59 25
+59 26
+59 27
+59 28
+59 29
+59 30
+59 31
+59 32
+59 33
+59 34
+59 35
+59 36
+59 37
+59 38
+59 39
+59 40
+59 41
+59 42
+59 43
+59 44
+59 45
+59 46
+59 47
+59 48
+59 49
+59 50
+59 51
+59 52
+59 53
+59 54
+59 55
+59 56
+59 57
+59 58
+59 59
diff --git a/ConsoleApp/Output/HexDetectedMines.txt b/ConsoleApp/Output/HexDetectedMines.txt
index e69de29..70d7f32 100644
--- a/ConsoleApp/Output/HexDetectedMines.txt
+++ b/ConsoleApp/Output/HexDetectedMines.txt
@@ -0,0 +1,35 @@
+48 7
+47 13
+35 8
+12 8
+5 18
+31 14
+28 20
+36 14
+37 12
+42 18
+49 16
+45 23
+42 23
+49 27
+42 29
+6 22
+10 28
+9 31
+19 27
+54 29
+16 39
+10 34
+26 40
+33 42
+50 42
+52 53
+45 48
+38 48
+36 51
+34 51
+29 54
+30 50
+27 54
+26 49
+12 49
diff --git a/ConsoleApp/Output/HexPath.txt b/ConsoleApp/Output/HexPath.txt
index 032288e..78630bc 100644
--- a/ConsoleApp/Output/HexPath.txt
+++ b/ConsoleApp/Output/HexPath.txt
@@ -46,403 +46,231 @@
45 0
46 0
47 0
-47 1
-47 2
-47 3
-46 3
-45 3
-44 3
-43 3
-42 3
-41 3
-40 3
-39 3
-38 3
-37 3
-36 3
-35 3
-34 3
-33 3
-32 3
-31 3
-30 3
-29 3
-28 3
-27 3
-26 3
-25 3
-24 3
-23 3
-22 3
-21 3
-20 3
-19 3
-18 3
-17 3
-16 3
-15 3
-14 3
-13 3
-12 3
-11 3
-10 3
-9 3
-8 3
-7 3
-6 3
-5 3
-4 3
-3 3
-2 3
-1 3
-0 3
-1 4
-0 5
-0 6
-1 6
-2 6
-3 6
-4 6
-5 6
-6 6
-7 6
-6 5
-7 4
-8 4
-9 4
-10 4
-10 5
-11 6
-12 6
-13 6
-14 6
-15 6
-16 6
-17 6
-18 6
-19 6
-20 6
-21 6
-20 5
-21 4
-22 4
-23 4
-24 4
-24 5
-25 6
-26 6
-27 6
-28 6
-29 6
-30 6
-31 6
-32 6
-33 6
-34 6
-35 6
-36 6
-37 6
-38 6
-39 6
-40 6
-41 6
-42 6
-43 6
-44 6
-45 6
-46 6
-47 6
-47 7
-47 8
-47 9
+48 0
+49 0
+50 0
+51 0
+52 0
+53 0
+54 0
+55 0
+56 0
+57 0
+58 0
+59 0
+59 1
+59 2
+59 3
+59 4
+59 5
+59 6
+59 7
+58 7
+57 7
+56 7
+55 7
+54 7
+53 7
+52 7
+51 7
+51 7
+51 7
+51 8
+50 9
+50 10
+49 10
+48 10
+47 10
46 9
-45 9
-44 9
-43 9
-42 9
-41 9
-40 9
-39 9
-38 9
-37 9
-36 9
-35 9
-34 9
-33 9
-32 9
-31 9
-30 9
-29 9
-28 9
-27 9
-27 8
-26 8
-25 8
-24 9
-24 9
-24 10
-23 10
-23 11
-23 12
-22 12
-21 12
-20 12
-19 11
-19 10
-18 9
-17 9
-16 9
-15 9
-14 9
-13 9
-12 9
-12 9
-13 10
-12 11
-12 12
-13 12
-13 13
-13 14
-12 15
-12 16
-11 16
-10 16
-9 16
-8 15
-8 14
-7 13
-7 12
-6 11
-6 10
-5 9
-4 9
-3 9
-2 9
+46 8
+45 7
+44 7
+43 7
+42 7
+41 7
+40 7
+39 7
+38 7
+37 7
+37 7
+37 6
+36 5
+35 5
+34 5
+33 5
+33 6
+32 7
+31 7
+30 7
+29 7
+28 7
+27 7
+26 7
+25 7
+24 7
+23 7
+22 7
+21 7
+20 7
+19 7
+18 7
+17 7
+16 7
+15 7
+14 7
+14 7
+14 6
+13 5
+12 5
+11 5
+10 5
+10 6
+9 7
+8 7
+7 7
+6 7
+5 7
+4 7
+3 7
+2 7
+1 7
+0 7
+1 8
1 9
-0 9
-1 10
-0 11
-0 12
+2 10
+1 11
1 12
-2 12
-3 12
-4 12
-5 12
-6 12
-7 12
-8 12
-8 12
-7 13
+0 13
+0 14
+1 14
+2 14
+3 14
+4 14
+5 14
+6 14
+7 14
8 14
-8 15
-9 16
-10 16
-11 16
-12 16
-12 15
+9 14
+10 14
+11 14
+12 14
13 14
-13 13
-13 12
-14 12
-15 12
-16 12
-17 12
-18 12
-19 12
-20 12
-21 12
-22 12
-22 12
-21 13
-21 14
-20 13
-19 13
+14 14
+15 14
+16 14
+17 14
+18 14
19 14
-18 15
-18 16
-18 17
-19 18
-19 19
-20 19
-21 19
-22 19
-23 18
-23 17
-23 18
-23 19
-24 19
-25 19
-26 19
-27 18
-27 17
-28 16
+20 14
+21 14
+22 14
+23 14
+24 14
+25 14
+26 14
+27 14
+28 14
+28 14
+28 14
28 15
-29 14
-29 13
-30 12
-31 12
-32 12
-33 12
-34 12
-35 12
-36 12
-37 12
-38 12
-39 12
-40 12
-41 12
-42 12
-43 12
-44 12
-45 12
-46 12
-47 12
-47 13
-47 14
-47 15
-46 15
-45 15
-44 15
-43 15
-42 15
-41 15
-41 14
-40 14
-39 14
+29 16
+29 17
+30 17
+31 17
+32 17
+33 17
+33 17
+34 17
+35 17
+36 17
+37 17
+38 16
38 15
-37 15
-36 15
-35 15
-34 15
-33 15
-32 15
-31 15
-30 15
-29 15
-28 15
-27 15
-27 15
-28 16
-27 17
-27 18
-26 19
-25 19
-24 19
-23 19
-22 19
-21 19
-20 19
-19 19
-19 18
-18 17
-18 16
-18 15
-17 15
-16 15
-15 15
-14 15
-13 15
-12 15
-12 15
-12 16
-11 16
-10 16
-9 16
-8 15
-7 15
-6 15
-5 15
-4 15
-3 15
-2 15
-1 15
-0 15
-1 16
-0 17
-0 18
-1 18
-2 18
-3 18
-4 18
-5 18
-6 18
-5 17
-6 16
-7 16
-8 16
-9 16
-9 17
-10 16
-11 16
-12 16
-12 17
-13 18
-14 18
-15 18
-16 18
-17 18
-18 18
-19 18
-19 18
-19 19
-20 19
-21 19
-22 19
-23 18
-23 18
-23 19
-24 19
-25 19
-26 19
-27 18
-28 18
-29 18
-30 18
-31 18
-32 18
-33 18
-34 18
-35 18
-36 18
-37 18
-38 18
-38 18
-38 19
-39 20
-40 20
-41 20
-42 20
-42 19
-43 18
-44 18
-45 18
-46 18
+39 14
+40 14
+41 14
+42 14
+43 14
+44 14
+45 14
+45 14
+45 15
+46 16
+46 17
47 18
47 19
+48 19
+49 19
+50 19
+51 18
+51 17
+52 16
+51 15
+52 14
+53 14
+54 14
+55 14
+56 14
+57 14
+58 14
+59 14
+59 15
+59 16
+59 17
+59 18
+59 19
+59 20
+59 21
+58 21
+57 21
+56 21
+55 21
+54 21
+53 21
+52 21
+51 21
+50 21
+49 21
+48 21
+47 21
+47 21
+47 20
+46 20
+45 20
+46 20
47 20
47 21
-46 21
-45 21
-44 21
-43 21
-42 21
-41 21
-40 21
-39 21
+48 22
+48 23
+48 24
+47 25
+47 26
+46 26
+45 26
+44 26
+43 26
+42 26
+41 26
+40 25
+40 24
+39 23
+39 22
38 21
37 21
36 21
-36 20
-35 20
-34 20
+35 21
+34 21
33 21
32 21
31 21
30 21
-29 21
-28 21
-27 21
-26 21
+30 21
+30 22
+29 23
+28 23
+27 23
+26 23
+26 22
25 21
24 21
23 21
@@ -457,374 +285,178 @@
14 21
13 21
12 21
-12 21
-12 22
-11 22
-10 22
+11 21
+10 21
+9 21
+8 21
+8 21
9 22
-8 22
-7 22
-6 22
-5 21
-4 21
-3 21
+8 23
+8 24
+7 25
+6 25
+5 25
+4 25
+4 24
+3 23
+3 22
2 21
1 21
0 21
1 22
-0 23
-0 24
-1 24
+1 23
2 24
-3 24
-4 24
-5 24
-6 24
-7 24
-6 23
-7 22
-8 22
-9 22
-10 22
-10 23
-11 24
-12 24
-13 24
-14 24
-15 24
-16 24
-17 24
-18 24
-19 24
-20 24
-21 24
-22 24
-23 24
-24 24
-25 24
-26 24
-27 24
-28 24
-29 24
-30 24
-31 24
-32 24
-31 24
-30 25
-30 26
-30 27
-31 28
-31 29
-32 29
-33 29
-34 29
-35 28
-35 27
-36 26
-37 26
-37 25
-38 24
-39 24
-40 24
-41 24
-42 24
-43 24
-44 24
-45 24
-46 24
-47 24
-47 25
-47 26
-47 27
-46 27
-45 27
-44 27
-43 27
-42 27
-41 27
-40 27
-39 27
-38 27
-37 27
-36 27
-35 27
-35 27
-35 28
-34 29
-33 29
-32 29
-31 29
-31 28
-30 27
-29 27
-28 27
-27 27
-26 27
-25 27
-24 27
-23 27
-22 27
-21 27
-20 27
-19 27
-18 27
-17 27
-16 27
-15 27
-14 27
-13 27
-12 27
-11 27
+1 25
+1 26
+0 27
+0 28
+1 28
+2 28
+3 28
+4 28
+5 28
+6 28
+7 28
+7 28
+7 27
+8 26
+8 25
+9 25
+10 25
+11 25
+12 26
12 27
13 28
-12 29
-12 30
-11 31
-10 31
-9 31
-8 31
-8 30
-7 29
-7 28
-6 27
-5 27
-4 27
-3 27
-2 27
-1 27
-0 27
-1 28
-0 29
-0 30
-1 30
-2 30
-3 30
-4 30
-5 30
-5 29
-6 29
-7 29
-8 30
-8 30
-8 31
-9 31
-10 31
-11 31
-12 30
-13 30
-14 30
-15 30
-16 30
-17 30
+14 28
+15 28
+16 28
+17 28
+17 28
+17 29
18 30
-18 30
-17 31
-18 32
-18 33
-19 33
-20 33
-21 33
-22 32
-22 31
-23 30
-24 30
-25 30
-26 30
-27 30
-28 30
-29 30
-30 30
-31 30
-32 30
-33 30
-34 30
-35 30
-36 30
-37 30
-38 30
-39 30
-40 30
-41 30
-42 30
-43 30
-44 30
-45 30
-46 30
-47 30
-47 31
-47 32
-47 33
-46 33
-45 33
-44 33
-43 33
-42 33
-41 33
-40 33
-39 33
-40 32
-39 31
-38 31
-37 31
-36 31
-36 32
-35 33
-34 33
-33 33
-32 33
-31 33
-30 33
-29 33
-28 33
-27 33
-26 33
-25 33
-24 33
-23 33
-22 33
-21 33
-20 33
-19 33
-18 33
-17 33
-16 33
-15 33
-14 33
-13 33
-12 33
-11 33
-10 33
-9 33
-8 33
-8 33
-8 34
+19 30
+20 30
+21 30
+21 29
+22 28
+23 28
+24 28
+25 28
+26 28
+27 28
+28 28
+29 28
+30 28
+31 28
+32 28
+33 28
+34 28
+35 28
+36 28
+37 28
+38 28
+39 28
+40 28
+40 28
+40 27
+41 26
+42 26
+43 26
+44 26
+44 27
+45 28
+46 28
+47 28
+47 28
+47 29
+48 30
+49 30
+50 30
+51 30
+51 29
+52 28
+52 27
+53 26
+54 26
+55 26
+56 26
+56 27
+57 28
+58 28
+59 28
+59 29
+59 30
+59 31
+59 32
+59 33
+59 34
+59 35
+58 35
+57 35
+56 35
+55 35
+54 35
+53 35
+52 35
+51 35
+50 35
+49 35
+48 35
+47 35
+46 35
+45 35
+44 35
+43 35
+42 35
+41 35
+40 35
+39 35
+38 35
+37 35
+36 35
+35 35
+34 35
+33 35
+32 35
+31 35
+30 35
+29 35
+28 35
+27 35
+26 35
+25 35
+24 35
+23 35
+22 35
+21 35
+20 35
+19 35
+18 35
+17 35
+16 35
+15 35
+14 35
+13 35
+12 35
+12 35
+12 36
+11 37
+10 37
+9 37
+8 37
+8 36
7 35
6 35
5 35
4 35
-4 34
-3 33
-2 33
-1 33
-0 33
-1 34
+3 35
+2 35
+1 35
0 35
-0 36
1 36
-2 36
-3 36
-4 36
-5 36
-6 36
-7 36
-8 36
-9 36
-10 36
-11 36
-12 36
-13 36
-14 36
-15 36
-16 36
-17 36
-18 36
-18 35
-19 35
-19 34
-19 33
-20 33
-21 33
-22 33
-23 34
-23 35
-24 36
-25 36
-26 36
-27 36
-28 36
-29 36
-29 35
-30 35
-31 35
-32 36
-33 36
-34 36
-35 36
-36 36
-36 36
-36 37
-37 37
-38 37
-39 37
-40 36
-41 36
-42 36
-43 36
-44 36
-45 36
-46 36
-47 36
-47 37
-47 38
-47 39
-46 39
-45 39
-44 39
-43 39
-42 39
-41 39
-40 39
-39 39
-38 39
-38 39
-38 39
-38 40
-37 41
-37 42
-36 42
-35 42
-34 42
-33 41
-33 40
-32 39
-32 39
-32 40
-31 41
-30 41
-29 41
-28 41
-28 40
-27 39
-26 39
-25 39
-24 39
-23 39
-22 39
-21 39
-21 39
-21 40
-20 41
-19 41
-18 41
-17 41
-17 40
-16 39
-15 39
-14 39
-13 39
-12 39
-11 39
-10 39
-9 39
-8 39
-7 39
-6 39
-5 39
-4 39
-3 39
-2 39
+1 37
+2 38
1 39
-0 39
1 40
0 41
0 42
@@ -852,17 +484,24 @@
22 42
23 42
24 42
-25 42
-26 42
-27 42
+24 42
+24 43
+25 43
+26 43
+27 43
28 42
29 42
30 42
-31 42
-32 42
-33 42
-34 42
-35 42
+30 42
+30 42
+30 43
+31 44
+31 45
+32 45
+33 45
+34 45
+35 44
+35 43
36 42
37 42
38 42
@@ -875,53 +514,174 @@
45 42
46 42
47 42
+47 42
+47 42
47 43
-47 44
-47 45
-46 45
-45 45
-44 45
-43 45
-42 45
-41 45
-40 45
-39 45
-38 45
-37 45
-36 45
-35 45
-34 45
-33 45
-32 45
-31 45
-30 45
-29 45
-28 45
-27 45
-26 45
-25 45
-24 45
-23 45
-22 45
-21 45
-20 45
-19 45
-18 45
-17 45
-16 45
-15 45
-14 45
-13 45
-12 45
-11 45
-10 45
-9 45
-8 45
-7 45
-6 45
-5 45
-4 45
-3 45
-2 45
-1 45
-0 45
+48 44
+48 45
+49 45
+50 45
+51 45
+52 44
+52 43
+53 42
+54 42
+55 42
+56 42
+57 42
+58 42
+59 42
+59 43
+59 44
+59 45
+59 46
+59 47
+59 48
+59 49
+58 49
+57 49
+56 49
+55 49
+54 49
+53 49
+52 49
+51 49
+50 49
+49 49
+48 49
+47 49
+47 49
+47 50
+46 51
+45 51
+44 51
+43 51
+43 50
+42 49
+41 49
+40 49
+40 49
+40 50
+39 51
+39 52
+38 53
+38 54
+37 54
+36 54
+35 54
+34 54
+33 54
+32 53
+32 54
+31 55
+31 56
+30 57
+29 57
+28 57
+27 57
+26 57
+25 57
+25 56
+24 55
+24 54
+24 53
+24 52
+23 51
+23 50
+23 49
+22 49
+21 49
+20 49
+19 49
+18 49
+17 49
+16 49
+15 49
+15 49
+15 49
+15 50
+14 51
+14 52
+13 52
+12 52
+11 52
+10 51
+10 50
+9 49
+8 49
+7 49
+6 49
+5 49
+4 49
+3 49
+2 49
+1 49
+0 49
+1 50
+1 51
+2 52
+1 53
+1 54
+0 55
+0 56
+1 56
+2 56
+3 56
+4 56
+5 56
+6 56
+7 56
+8 56
+9 56
+10 56
+11 56
+12 56
+13 56
+14 56
+15 56
+16 56
+17 56
+18 56
+19 56
+20 56
+21 56
+22 56
+23 56
+24 56
+25 56
+25 56
+25 57
+26 57
+27 57
+28 57
+29 57
+30 57
+31 56
+32 56
+33 56
+34 56
+35 56
+36 56
+37 56
+38 56
+39 56
+40 56
+41 56
+42 56
+43 56
+44 56
+45 56
+46 56
+47 56
+48 56
+49 56
+50 56
+51 56
+52 56
+53 56
+54 56
+55 56
+56 56
+57 56
+58 56
+59 56
diff --git a/ConsoleApp/Output/HexTest.png b/ConsoleApp/Output/HexTest.png
index 0dccbf7..ce3122a 100644
Binary files a/ConsoleApp/Output/HexTest.png and b/ConsoleApp/Output/HexTest.png differ
diff --git a/ConsoleApp/Output/Mines.txt b/ConsoleApp/Output/Mines.txt
new file mode 100644
index 0000000..ac08a9a
--- /dev/null
+++ b/ConsoleApp/Output/Mines.txt
@@ -0,0 +1,36 @@
+30 50
+48 7
+16 39
+42 18
+47 13
+50 42
+52 53
+49 16
+36 14
+54 29
+6 22
+26 49
+28 20
+10 34
+27 54
+49 27
+35 8
+26 40
+38 48
+10 28
+12 8
+5 18
+42 23
+45 23
+42 29
+36 51
+37 12
+29 54
+34 51
+33 12
+45 48
+19 27
+12 49
+31 14
+33 42
+9 31
diff --git a/ConsoleApp/Output/SquareCoverage.png b/ConsoleApp/Output/SquareCoverage.png
new file mode 100644
index 0000000..54a5cdc
Binary files /dev/null and b/ConsoleApp/Output/SquareCoverage.png differ
diff --git a/ConsoleApp/Output/SquareCoveredCells.txt b/ConsoleApp/Output/SquareCoveredCells.txt
new file mode 100644
index 0000000..833d09b
--- /dev/null
+++ b/ConsoleApp/Output/SquareCoveredCells.txt
@@ -0,0 +1,3251 @@
+0 0
+0 1
+0 2
+0 3
+0 4
+0 5
+0 6
+0 7
+0 8
+0 9
+0 10
+0 11
+0 12
+0 13
+0 14
+0 15
+0 16
+0 17
+0 18
+0 19
+0 20
+0 21
+0 22
+0 23
+0 24
+0 25
+0 26
+0 27
+0 28
+0 29
+0 30
+0 31
+0 32
+0 33
+0 34
+0 35
+0 36
+0 37
+0 38
+0 39
+0 40
+0 41
+0 42
+0 43
+0 44
+0 45
+0 46
+0 47
+0 48
+0 49
+0 50
+0 51
+0 52
+0 53
+0 54
+0 55
+0 56
+0 57
+0 58
+1 0
+1 1
+1 2
+1 3
+1 4
+1 5
+1 6
+1 7
+1 8
+1 9
+1 10
+1 11
+1 12
+1 13
+1 14
+1 15
+1 16
+1 17
+1 18
+1 19
+1 20
+1 21
+1 22
+1 23
+1 24
+1 25
+1 26
+1 27
+1 28
+1 29
+1 30
+1 31
+1 32
+1 33
+1 34
+1 35
+1 36
+1 37
+1 38
+1 39
+1 40
+1 41
+1 42
+1 43
+1 44
+1 45
+1 46
+1 47
+1 48
+1 49
+1 50
+1 51
+1 52
+1 53
+1 54
+1 55
+1 56
+1 57
+1 58
+2 0
+2 1
+2 2
+2 3
+2 4
+2 5
+2 6
+2 7
+2 8
+2 9
+2 10
+2 11
+2 12
+2 13
+2 14
+2 15
+2 16
+2 17
+2 18
+2 19
+2 20
+2 21
+2 22
+2 23
+2 24
+2 25
+2 26
+2 27
+2 28
+2 29
+2 30
+2 31
+2 32
+2 33
+2 34
+2 35
+2 36
+2 37
+2 38
+2 39
+2 40
+2 41
+2 42
+2 43
+2 44
+2 45
+2 46
+2 47
+2 48
+2 49
+2 50
+2 51
+2 52
+2 53
+2 54
+2 55
+2 56
+2 57
+2 58
+3 0
+3 1
+3 2
+3 3
+3 4
+3 5
+3 6
+3 7
+3 8
+3 9
+3 10
+3 11
+3 12
+3 13
+3 14
+3 15
+3 16
+3 17
+3 18
+3 19
+3 20
+3 21
+3 22
+3 23
+3 24
+3 25
+3 26
+3 27
+3 28
+3 29
+3 30
+3 31
+3 32
+3 33
+3 34
+3 35
+3 36
+3 37
+3 38
+3 39
+3 40
+3 41
+3 42
+3 43
+3 44
+3 45
+3 46
+3 47
+3 48
+3 49
+3 50
+3 51
+3 52
+3 53
+3 54
+3 55
+3 56
+3 57
+3 58
+4 0
+4 1
+4 2
+4 3
+4 4
+4 5
+4 6
+4 7
+4 8
+4 9
+4 10
+4 11
+4 12
+4 13
+4 14
+4 15
+4 16
+4 17
+4 18
+4 19
+4 20
+4 21
+4 22
+4 23
+4 25
+4 26
+4 27
+4 28
+4 29
+4 30
+4 31
+4 32
+4 33
+4 34
+4 35
+4 36
+4 37
+4 38
+4 39
+4 40
+4 41
+4 42
+4 43
+4 44
+4 45
+4 46
+4 47
+4 48
+4 49
+4 50
+4 51
+4 52
+4 53
+4 54
+4 55
+4 56
+4 57
+4 58
+5 0
+5 1
+5 2
+5 3
+5 4
+5 5
+5 6
+5 7
+5 8
+5 9
+5 10
+5 11
+5 12
+5 13
+5 14
+5 15
+5 16
+5 17
+5 18
+5 19
+5 20
+5 25
+5 26
+5 27
+5 28
+5 29
+5 30
+5 31
+5 32
+5 33
+5 34
+5 35
+5 36
+5 37
+5 38
+5 39
+5 40
+5 41
+5 42
+5 43
+5 44
+5 45
+5 46
+5 47
+5 48
+5 49
+5 50
+5 51
+5 52
+5 53
+5 54
+5 55
+5 56
+5 57
+5 58
+6 0
+6 1
+6 2
+6 3
+6 4
+6 5
+6 6
+6 7
+6 8
+6 9
+6 10
+6 11
+6 12
+6 13
+6 14
+6 15
+6 16
+6 17
+6 18
+6 19
+6 20
+6 21
+6 22
+6 23
+6 25
+6 26
+6 27
+6 28
+6 29
+6 30
+6 31
+6 32
+6 33
+6 34
+6 35
+6 36
+6 37
+6 38
+6 39
+6 40
+6 41
+6 42
+6 43
+6 44
+6 45
+6 46
+6 47
+6 48
+6 49
+6 50
+6 51
+6 52
+6 53
+6 54
+6 55
+6 56
+6 57
+6 58
+7 0
+7 1
+7 2
+7 3
+7 4
+7 5
+7 6
+7 7
+7 8
+7 9
+7 10
+7 11
+7 12
+7 13
+7 14
+7 15
+7 16
+7 17
+7 18
+7 19
+7 20
+7 21
+7 22
+7 23
+7 24
+7 25
+7 26
+7 27
+7 28
+7 29
+7 30
+7 31
+7 32
+7 33
+7 34
+7 35
+7 36
+7 37
+7 38
+7 39
+7 40
+7 41
+7 42
+7 43
+7 44
+7 45
+7 46
+7 47
+7 48
+7 49
+7 50
+7 51
+7 52
+7 53
+7 54
+7 55
+7 56
+7 57
+7 58
+8 0
+8 1
+8 2
+8 3
+8 4
+8 5
+8 6
+8 7
+8 8
+8 9
+8 10
+8 11
+8 12
+8 13
+8 14
+8 15
+8 16
+8 17
+8 18
+8 19
+8 20
+8 21
+8 22
+8 23
+8 24
+8 25
+8 26
+8 27
+8 28
+8 29
+8 30
+8 31
+8 32
+8 33
+8 34
+8 35
+8 36
+8 37
+8 38
+8 39
+8 40
+8 41
+8 42
+8 43
+8 44
+8 45
+8 46
+8 47
+8 48
+8 49
+8 50
+8 51
+8 52
+8 53
+8 54
+8 55
+8 56
+8 57
+8 58
+9 0
+9 1
+9 2
+9 3
+9 4
+9 5
+9 6
+9 7
+9 8
+9 9
+9 10
+9 11
+9 12
+9 13
+9 14
+9 15
+9 16
+9 17
+9 18
+9 19
+9 20
+9 21
+9 22
+9 23
+9 24
+9 25
+9 26
+9 27
+9 28
+9 29
+9 30
+9 31
+9 32
+9 33
+9 34
+9 35
+9 36
+9 37
+9 38
+9 39
+9 40
+9 41
+9 42
+9 43
+9 44
+9 45
+9 46
+9 47
+9 48
+9 49
+9 50
+9 51
+9 52
+9 53
+9 54
+9 55
+9 56
+9 57
+9 58
+10 0
+10 1
+10 2
+10 3
+10 4
+10 5
+10 6
+10 7
+10 8
+10 9
+10 10
+10 11
+10 12
+10 13
+10 14
+10 15
+10 16
+10 17
+10 18
+10 19
+10 20
+10 21
+10 22
+10 23
+10 24
+10 26
+10 27
+10 28
+10 29
+10 30
+10 33
+10 34
+10 35
+10 36
+10 37
+10 38
+10 39
+10 40
+10 41
+10 42
+10 43
+10 44
+10 45
+10 46
+10 47
+10 48
+10 49
+10 50
+10 51
+10 52
+10 53
+10 54
+10 55
+10 56
+10 57
+10 58
+11 0
+11 1
+11 2
+11 3
+11 4
+11 5
+11 6
+11 7
+11 8
+11 9
+11 11
+11 12
+11 13
+11 14
+11 15
+11 16
+11 17
+11 18
+11 19
+11 20
+11 21
+11 22
+11 23
+11 24
+11 33
+11 34
+11 35
+11 36
+11 37
+11 38
+11 39
+11 40
+11 41
+11 42
+11 43
+11 44
+11 45
+11 46
+11 47
+11 48
+11 49
+11 50
+11 51
+11 52
+11 53
+11 54
+11 55
+11 56
+11 57
+11 58
+12 0
+12 1
+12 2
+12 3
+12 4
+12 5
+12 6
+12 7
+12 8
+12 9
+12 11
+12 12
+12 13
+12 14
+12 15
+12 16
+12 17
+12 18
+12 19
+12 20
+12 21
+12 22
+12 23
+12 24
+12 32
+12 33
+12 34
+12 35
+12 36
+12 37
+12 38
+12 39
+12 40
+12 41
+12 42
+12 43
+12 44
+12 45
+12 46
+12 47
+12 48
+12 49
+12 50
+12 51
+12 52
+12 53
+12 54
+12 55
+12 56
+12 57
+12 58
+13 0
+13 1
+13 2
+13 3
+13 4
+13 5
+13 6
+13 7
+13 8
+13 9
+13 10
+13 11
+13 12
+13 13
+13 14
+13 15
+13 16
+13 17
+13 18
+13 19
+13 20
+13 21
+13 22
+13 23
+13 24
+13 27
+13 28
+13 29
+13 30
+13 31
+13 32
+13 33
+13 34
+13 35
+13 36
+13 37
+13 38
+13 39
+13 40
+13 41
+13 42
+13 43
+13 44
+13 45
+13 46
+13 47
+13 48
+13 49
+13 50
+13 51
+13 52
+13 53
+13 54
+13 55
+13 56
+13 57
+13 58
+14 0
+14 1
+14 2
+14 3
+14 4
+14 5
+14 6
+14 7
+14 8
+14 9
+14 10
+14 11
+14 12
+14 13
+14 14
+14 15
+14 16
+14 17
+14 18
+14 19
+14 20
+14 21
+14 22
+14 23
+14 24
+14 26
+14 27
+14 28
+14 29
+14 30
+14 31
+14 32
+14 33
+14 34
+14 35
+14 36
+14 37
+14 38
+14 39
+14 40
+14 41
+14 42
+14 43
+14 44
+14 45
+14 46
+14 47
+14 48
+14 49
+14 50
+14 51
+14 52
+14 53
+14 54
+14 55
+14 56
+14 57
+14 58
+15 0
+15 1
+15 2
+15 3
+15 4
+15 5
+15 6
+15 7
+15 8
+15 9
+15 10
+15 11
+15 12
+15 13
+15 14
+15 15
+15 16
+15 17
+15 18
+15 19
+15 20
+15 21
+15 22
+15 23
+15 24
+15 26
+15 27
+15 28
+15 29
+15 30
+15 31
+15 32
+15 33
+15 34
+15 35
+15 36
+15 37
+15 38
+15 39
+15 40
+15 41
+15 42
+15 43
+15 44
+15 45
+15 46
+15 47
+15 48
+15 49
+15 50
+15 51
+15 52
+15 53
+15 54
+15 55
+15 56
+15 57
+15 58
+16 0
+16 1
+16 2
+16 3
+16 4
+16 5
+16 6
+16 7
+16 8
+16 9
+16 10
+16 11
+16 12
+16 13
+16 14
+16 15
+16 16
+16 17
+16 18
+16 19
+16 20
+16 21
+16 22
+16 23
+16 24
+16 26
+16 27
+16 28
+16 29
+16 30
+16 31
+16 32
+16 33
+16 34
+16 35
+16 36
+16 37
+16 38
+16 39
+16 40
+16 41
+16 42
+16 43
+16 44
+16 45
+16 46
+16 47
+16 48
+16 49
+16 50
+16 51
+16 52
+16 53
+16 54
+16 55
+16 56
+16 57
+16 58
+17 0
+17 1
+17 2
+17 3
+17 4
+17 5
+17 6
+17 7
+17 8
+17 9
+17 10
+17 11
+17 12
+17 13
+17 14
+17 15
+17 16
+17 17
+17 18
+17 19
+17 20
+17 21
+17 22
+17 23
+17 24
+17 26
+17 27
+17 28
+17 29
+17 30
+17 31
+17 32
+17 33
+17 34
+17 35
+17 36
+17 37
+17 38
+17 39
+17 40
+17 41
+17 42
+17 43
+17 44
+17 45
+17 46
+17 47
+17 48
+17 49
+17 50
+17 51
+17 52
+17 53
+17 54
+17 55
+17 56
+17 57
+17 58
+18 0
+18 1
+18 2
+18 3
+18 4
+18 5
+18 6
+18 7
+18 8
+18 9
+18 10
+18 11
+18 12
+18 13
+18 14
+18 15
+18 16
+18 17
+18 18
+18 19
+18 20
+18 21
+18 22
+18 23
+18 24
+18 26
+18 27
+18 28
+18 29
+18 30
+18 31
+18 32
+18 33
+18 34
+18 35
+18 36
+18 37
+18 38
+18 39
+18 40
+18 41
+18 42
+18 43
+18 44
+18 45
+18 46
+18 47
+18 48
+18 49
+18 50
+18 51
+18 52
+18 53
+18 54
+18 55
+18 56
+18 57
+18 58
+19 0
+19 1
+19 2
+19 3
+19 4
+19 5
+19 6
+19 7
+19 8
+19 9
+19 10
+19 11
+19 12
+19 13
+19 14
+19 15
+19 16
+19 17
+19 18
+19 19
+19 20
+19 21
+19 22
+19 23
+19 24
+19 27
+19 28
+19 29
+19 30
+19 31
+19 32
+19 33
+19 34
+19 35
+19 36
+19 37
+19 38
+19 39
+19 40
+19 41
+19 42
+19 43
+19 44
+19 45
+19 46
+19 47
+19 48
+19 49
+19 50
+19 51
+19 52
+19 53
+19 54
+19 55
+19 56
+19 57
+19 58
+20 0
+20 1
+20 2
+20 3
+20 4
+20 5
+20 6
+20 7
+20 8
+20 9
+20 10
+20 11
+20 12
+20 13
+20 14
+20 15
+20 16
+20 17
+20 18
+20 19
+20 20
+20 21
+20 22
+20 23
+20 24
+20 26
+20 27
+20 28
+20 29
+20 30
+20 31
+20 32
+20 33
+20 34
+20 35
+20 36
+20 37
+20 38
+20 39
+20 40
+20 41
+20 42
+20 43
+20 44
+20 45
+20 46
+20 47
+20 48
+20 49
+20 50
+20 51
+20 52
+20 53
+20 54
+20 55
+20 56
+20 57
+20 58
+21 0
+21 1
+21 2
+21 3
+21 4
+21 5
+21 6
+21 7
+21 8
+21 9
+21 10
+21 11
+21 12
+21 13
+21 14
+21 15
+21 16
+21 17
+21 18
+21 19
+21 20
+21 21
+21 22
+21 23
+21 24
+21 25
+21 26
+21 27
+21 28
+21 29
+21 30
+21 31
+21 32
+21 33
+21 34
+21 35
+21 36
+21 37
+21 38
+21 39
+21 40
+21 41
+21 42
+21 43
+21 44
+21 45
+21 46
+21 47
+21 48
+21 49
+21 50
+21 51
+21 52
+21 53
+21 54
+21 55
+21 56
+21 57
+21 58
+22 0
+22 1
+22 2
+22 3
+22 4
+22 5
+22 6
+22 7
+22 8
+22 9
+22 10
+22 11
+22 12
+22 13
+22 14
+22 15
+22 16
+22 17
+22 18
+22 19
+22 20
+22 21
+22 22
+22 23
+22 24
+22 25
+22 26
+22 27
+22 28
+22 29
+22 30
+22 31
+22 32
+22 33
+22 34
+22 35
+22 36
+22 37
+22 38
+22 39
+22 40
+22 41
+22 42
+22 43
+22 44
+22 45
+22 46
+22 47
+22 48
+22 49
+22 50
+22 51
+22 52
+22 53
+22 54
+22 55
+22 56
+22 57
+22 58
+23 0
+23 1
+23 2
+23 3
+23 4
+23 5
+23 6
+23 7
+23 8
+23 9
+23 10
+23 11
+23 12
+23 13
+23 14
+23 15
+23 16
+23 17
+23 18
+23 19
+23 20
+23 21
+23 22
+23 23
+23 24
+23 25
+23 26
+23 27
+23 28
+23 29
+23 30
+23 31
+23 32
+23 33
+23 34
+23 35
+23 36
+23 37
+23 38
+23 39
+23 40
+23 41
+23 42
+23 43
+23 44
+23 45
+23 46
+23 47
+23 48
+23 49
+23 50
+23 51
+23 52
+23 53
+23 54
+23 55
+23 56
+23 57
+23 58
+24 0
+24 1
+24 2
+24 3
+24 4
+24 5
+24 6
+24 7
+24 8
+24 9
+24 10
+24 11
+24 12
+24 13
+24 14
+24 15
+24 16
+24 17
+24 18
+24 19
+24 20
+24 21
+24 22
+24 23
+24 24
+24 25
+24 26
+24 27
+24 28
+24 29
+24 30
+24 31
+24 32
+24 33
+24 34
+24 35
+24 36
+24 37
+24 38
+24 39
+24 40
+24 41
+24 42
+24 43
+24 44
+24 45
+24 46
+24 47
+24 48
+24 49
+24 50
+24 51
+24 52
+24 53
+24 54
+24 55
+24 56
+24 57
+24 58
+25 0
+25 1
+25 2
+25 3
+25 4
+25 5
+25 6
+25 7
+25 8
+25 9
+25 10
+25 11
+25 12
+25 13
+25 14
+25 15
+25 16
+25 17
+25 18
+25 19
+25 20
+25 21
+25 22
+25 23
+25 24
+25 25
+25 26
+25 27
+25 28
+25 29
+25 30
+25 31
+25 32
+25 33
+25 34
+25 35
+25 36
+25 37
+25 38
+25 39
+25 40
+25 41
+25 42
+25 43
+25 44
+25 45
+25 46
+25 47
+25 48
+25 49
+25 50
+25 51
+25 52
+25 53
+25 54
+25 55
+25 56
+25 57
+25 58
+26 0
+26 1
+26 2
+26 3
+26 4
+26 5
+26 6
+26 7
+26 8
+26 9
+26 10
+26 11
+26 12
+26 13
+26 14
+26 15
+26 16
+26 17
+26 18
+26 19
+26 20
+26 21
+26 22
+26 23
+26 24
+26 25
+26 26
+26 27
+26 28
+26 29
+26 30
+26 31
+26 32
+26 33
+26 34
+26 35
+26 36
+26 37
+26 38
+26 40
+26 41
+26 42
+26 43
+26 44
+26 45
+26 46
+26 47
+26 48
+26 49
+26 50
+26 51
+26 52
+26 53
+26 54
+26 55
+26 56
+26 57
+26 58
+27 0
+27 1
+27 2
+27 3
+27 4
+27 5
+27 6
+27 7
+27 8
+27 9
+27 10
+27 11
+27 12
+27 13
+27 14
+27 15
+27 16
+27 17
+27 18
+27 19
+27 20
+27 21
+27 22
+27 23
+27 24
+27 25
+27 26
+27 27
+27 28
+27 29
+27 30
+27 31
+27 32
+27 33
+27 34
+27 35
+27 36
+27 37
+27 38
+27 40
+27 41
+27 42
+27 43
+27 44
+27 45
+27 46
+27 47
+27 48
+27 49
+27 51
+27 52
+27 53
+27 54
+27 55
+27 56
+27 57
+27 58
+28 0
+28 1
+28 2
+28 3
+28 4
+28 5
+28 6
+28 7
+28 8
+28 9
+28 10
+28 11
+28 12
+28 13
+28 14
+28 15
+28 16
+28 17
+28 18
+28 19
+28 20
+28 21
+28 22
+28 23
+28 24
+28 25
+28 26
+28 27
+28 28
+28 29
+28 30
+28 31
+28 32
+28 33
+28 34
+28 35
+28 36
+28 37
+28 38
+28 40
+28 41
+28 42
+28 43
+28 44
+28 45
+28 46
+28 47
+28 48
+28 49
+28 54
+28 55
+28 56
+28 57
+28 58
+29 0
+29 1
+29 2
+29 3
+29 4
+29 5
+29 6
+29 7
+29 8
+29 9
+29 10
+29 11
+29 12
+29 13
+29 14
+29 15
+29 16
+29 17
+29 18
+29 19
+29 20
+29 21
+29 22
+29 23
+29 24
+29 25
+29 26
+29 27
+29 28
+29 29
+29 30
+29 31
+29 32
+29 33
+29 34
+29 35
+29 36
+29 37
+29 38
+29 40
+29 41
+29 42
+29 43
+29 44
+29 45
+29 46
+29 47
+29 48
+29 49
+29 54
+29 55
+29 56
+29 57
+29 58
+30 0
+30 1
+30 2
+30 3
+30 4
+30 5
+30 6
+30 7
+30 8
+30 9
+30 10
+30 11
+30 12
+30 13
+30 14
+30 15
+30 16
+30 17
+30 18
+30 19
+30 20
+30 21
+30 22
+30 23
+30 24
+30 25
+30 26
+30 27
+30 28
+30 29
+30 30
+30 31
+30 32
+30 33
+30 34
+30 35
+30 36
+30 37
+30 38
+30 40
+30 41
+30 42
+30 43
+30 44
+30 45
+30 46
+30 47
+30 48
+30 49
+30 50
+30 54
+30 55
+30 56
+30 57
+30 58
+31 0
+31 1
+31 2
+31 3
+31 4
+31 5
+31 6
+31 7
+31 8
+31 9
+31 10
+31 12
+31 13
+31 14
+31 15
+31 16
+31 17
+31 18
+31 19
+31 20
+31 21
+31 22
+31 23
+31 24
+31 25
+31 26
+31 27
+31 28
+31 29
+31 30
+31 31
+31 32
+31 33
+31 34
+31 35
+31 36
+31 37
+31 38
+31 40
+31 41
+31 42
+31 43
+31 44
+31 45
+31 46
+31 47
+31 48
+31 49
+31 50
+31 53
+31 54
+31 55
+31 56
+31 57
+31 58
+32 0
+32 1
+32 2
+32 3
+32 4
+32 5
+32 6
+32 7
+32 8
+32 9
+32 10
+32 14
+32 15
+32 16
+32 17
+32 18
+32 19
+32 20
+32 21
+32 22
+32 23
+32 24
+32 25
+32 26
+32 27
+32 28
+32 29
+32 30
+32 31
+32 32
+32 33
+32 34
+32 35
+32 36
+32 37
+32 38
+32 40
+32 41
+32 42
+32 43
+32 44
+32 45
+32 46
+32 47
+32 48
+32 49
+32 50
+32 51
+32 52
+32 53
+32 54
+32 55
+32 56
+32 57
+32 58
+33 0
+33 1
+33 2
+33 3
+33 4
+33 5
+33 6
+33 7
+33 8
+33 9
+33 10
+33 14
+33 15
+33 16
+33 17
+33 18
+33 19
+33 20
+33 21
+33 22
+33 23
+33 24
+33 25
+33 26
+33 27
+33 28
+33 29
+33 30
+33 31
+33 32
+33 33
+33 34
+33 35
+33 36
+33 37
+33 38
+33 41
+33 42
+33 43
+33 44
+33 45
+33 46
+33 47
+33 48
+33 49
+33 50
+33 51
+33 52
+33 53
+33 54
+33 55
+33 56
+33 57
+33 58
+34 0
+34 1
+34 2
+34 3
+34 4
+34 5
+34 6
+34 7
+34 8
+34 9
+34 14
+34 15
+34 16
+34 17
+34 18
+34 19
+34 20
+34 21
+34 22
+34 23
+34 24
+34 25
+34 26
+34 27
+34 28
+34 29
+34 30
+34 31
+34 32
+34 33
+34 34
+34 35
+34 36
+34 37
+34 38
+34 43
+34 44
+34 45
+34 46
+34 47
+34 48
+34 49
+34 50
+34 51
+34 52
+34 53
+34 54
+34 55
+34 56
+34 57
+34 58
+35 0
+35 1
+35 2
+35 3
+35 4
+35 5
+35 6
+35 7
+35 8
+35 9
+35 14
+35 15
+35 16
+35 17
+35 18
+35 19
+35 20
+35 21
+35 22
+35 23
+35 24
+35 25
+35 26
+35 27
+35 28
+35 29
+35 30
+35 31
+35 32
+35 33
+35 34
+35 35
+35 36
+35 37
+35 38
+35 43
+35 44
+35 45
+35 46
+35 47
+35 48
+35 49
+35 50
+35 51
+35 52
+35 53
+35 54
+35 55
+35 56
+35 57
+35 58
+36 0
+36 1
+36 2
+36 3
+36 4
+36 5
+36 6
+36 7
+36 8
+36 9
+36 10
+36 14
+36 15
+36 16
+36 17
+36 18
+36 19
+36 20
+36 21
+36 22
+36 23
+36 24
+36 25
+36 26
+36 27
+36 28
+36 29
+36 30
+36 31
+36 32
+36 33
+36 34
+36 35
+36 36
+36 37
+36 38
+36 43
+36 44
+36 45
+36 46
+36 47
+36 48
+36 49
+36 50
+36 51
+36 52
+36 53
+36 54
+36 55
+36 56
+36 57
+36 58
+37 0
+37 1
+37 2
+37 3
+37 4
+37 5
+37 6
+37 7
+37 8
+37 9
+37 10
+37 15
+37 16
+37 17
+37 18
+37 19
+37 20
+37 21
+37 22
+37 23
+37 24
+37 25
+37 26
+37 27
+37 28
+37 29
+37 30
+37 31
+37 32
+37 33
+37 34
+37 35
+37 36
+37 37
+37 38
+37 43
+37 44
+37 45
+37 46
+37 47
+37 48
+37 49
+37 50
+37 51
+37 52
+37 53
+37 54
+37 55
+37 56
+37 57
+37 58
+38 0
+38 1
+38 2
+38 3
+38 4
+38 5
+38 6
+38 7
+38 8
+38 9
+38 10
+38 15
+38 16
+38 17
+38 18
+38 19
+38 20
+38 21
+38 22
+38 23
+38 24
+38 25
+38 26
+38 27
+38 28
+38 29
+38 30
+38 31
+38 32
+38 33
+38 34
+38 35
+38 36
+38 37
+38 38
+38 44
+38 45
+38 46
+38 47
+38 48
+38 49
+38 50
+38 51
+38 52
+38 53
+38 54
+38 55
+38 56
+38 57
+38 58
+39 0
+39 1
+39 2
+39 3
+39 4
+39 5
+39 6
+39 7
+39 8
+39 9
+39 10
+39 15
+39 16
+39 17
+39 18
+39 19
+39 20
+39 21
+39 22
+39 23
+39 24
+39 25
+39 26
+39 27
+39 28
+39 29
+39 30
+39 31
+39 32
+39 33
+39 34
+39 35
+39 36
+39 37
+39 38
+39 48
+39 49
+39 50
+39 51
+39 52
+39 53
+39 54
+39 55
+39 56
+39 57
+39 58
+40 0
+40 1
+40 2
+40 3
+40 4
+40 5
+40 6
+40 7
+40 8
+40 9
+40 10
+40 15
+40 16
+40 17
+40 18
+40 19
+40 20
+40 21
+40 22
+40 23
+40 24
+40 25
+40 26
+40 27
+40 28
+40 29
+40 30
+40 31
+40 32
+40 33
+40 34
+40 35
+40 36
+40 37
+40 38
+40 47
+40 48
+40 49
+40 50
+40 51
+40 52
+40 53
+40 54
+40 55
+40 56
+40 57
+40 58
+41 0
+41 1
+41 2
+41 3
+41 4
+41 5
+41 6
+41 7
+41 8
+41 9
+41 10
+41 15
+41 16
+41 17
+41 18
+41 19
+41 20
+41 21
+41 22
+41 23
+41 24
+41 25
+41 26
+41 27
+41 28
+41 29
+41 30
+41 31
+41 32
+41 33
+41 34
+41 35
+41 36
+41 37
+41 38
+41 47
+41 48
+41 49
+41 50
+41 51
+41 52
+41 53
+41 54
+41 55
+41 56
+41 57
+41 58
+42 0
+42 1
+42 2
+42 3
+42 4
+42 5
+42 6
+42 7
+42 8
+42 9
+42 10
+42 16
+42 17
+42 18
+42 19
+42 20
+42 21
+42 22
+42 23
+42 24
+42 25
+42 26
+42 27
+42 28
+42 29
+42 30
+42 31
+42 32
+42 33
+42 34
+42 35
+42 36
+42 37
+42 38
+42 47
+42 48
+42 49
+42 50
+42 51
+42 52
+42 53
+42 54
+42 55
+42 56
+42 57
+42 58
+43 0
+43 1
+43 2
+43 3
+43 4
+43 5
+43 6
+43 7
+43 8
+43 9
+43 10
+43 27
+43 28
+43 29
+43 30
+43 31
+43 32
+43 33
+43 34
+43 35
+43 36
+43 37
+43 38
+43 39
+43 40
+43 41
+43 42
+43 43
+43 44
+43 47
+43 48
+43 49
+43 50
+43 51
+43 52
+43 53
+43 54
+43 55
+43 56
+43 57
+43 58
+44 0
+44 1
+44 2
+44 3
+44 4
+44 5
+44 6
+44 7
+44 8
+44 9
+44 10
+44 26
+44 27
+44 28
+44 29
+44 30
+44 31
+44 32
+44 33
+44 34
+44 35
+44 36
+44 37
+44 38
+44 39
+44 40
+44 41
+44 42
+44 43
+44 44
+44 45
+44 47
+44 48
+44 49
+44 50
+44 51
+44 52
+44 53
+44 54
+44 55
+44 56
+44 57
+44 58
+45 0
+45 1
+45 2
+45 3
+45 4
+45 5
+45 6
+45 7
+45 8
+45 9
+45 19
+45 20
+45 21
+45 22
+45 23
+45 26
+45 27
+45 28
+45 29
+45 30
+45 31
+45 32
+45 33
+45 34
+45 35
+45 36
+45 37
+45 38
+45 39
+45 40
+45 41
+45 42
+45 43
+45 44
+45 45
+45 48
+45 49
+45 50
+45 51
+45 52
+45 53
+45 54
+45 55
+45 56
+45 57
+45 58
+46 0
+46 1
+46 2
+46 3
+46 4
+46 5
+46 6
+46 7
+46 18
+46 19
+46 20
+46 21
+46 22
+46 23
+46 24
+46 26
+46 27
+46 28
+46 29
+46 30
+46 31
+46 32
+46 33
+46 34
+46 35
+46 36
+46 37
+46 38
+46 39
+46 40
+46 41
+46 42
+46 43
+46 44
+46 45
+46 46
+46 47
+46 48
+46 49
+46 50
+46 51
+46 52
+46 53
+46 54
+46 55
+46 56
+46 57
+46 58
+47 0
+47 1
+47 2
+47 3
+47 4
+47 5
+47 6
+47 7
+47 9
+47 10
+47 11
+47 12
+47 13
+47 18
+47 19
+47 20
+47 21
+47 22
+47 23
+47 24
+47 26
+47 27
+47 28
+47 29
+47 30
+47 31
+47 32
+47 33
+47 34
+47 35
+47 36
+47 37
+47 38
+47 39
+47 40
+47 41
+47 42
+47 43
+47 44
+47 45
+47 46
+47 47
+47 48
+47 49
+47 50
+47 51
+47 52
+47 53
+47 54
+47 55
+47 56
+47 57
+47 58
+48 0
+48 1
+48 2
+48 3
+48 4
+48 5
+48 6
+48 7
+48 8
+48 9
+48 10
+48 11
+48 12
+48 13
+48 14
+48 15
+48 18
+48 19
+48 20
+48 21
+48 22
+48 23
+48 24
+48 26
+48 27
+48 28
+48 29
+48 30
+48 31
+48 32
+48 33
+48 34
+48 35
+48 36
+48 37
+48 38
+48 39
+48 40
+48 41
+48 42
+48 43
+48 44
+48 45
+48 46
+48 47
+48 48
+48 49
+48 50
+48 51
+48 52
+48 53
+48 54
+48 55
+48 56
+48 57
+48 58
+49 0
+49 1
+49 2
+49 3
+49 4
+49 5
+49 6
+49 7
+49 8
+49 9
+49 10
+49 11
+49 12
+49 13
+49 14
+49 15
+49 16
+49 18
+49 19
+49 20
+49 21
+49 22
+49 23
+49 24
+49 27
+49 28
+49 29
+49 30
+49 31
+49 32
+49 33
+49 34
+49 35
+49 36
+49 37
+49 38
+49 39
+49 40
+49 41
+49 42
+49 43
+49 44
+49 45
+49 46
+49 47
+49 48
+49 49
+49 50
+49 51
+49 52
+49 53
+49 54
+49 55
+49 56
+49 57
+49 58
+50 0
+50 1
+50 2
+50 3
+50 4
+50 5
+50 6
+50 7
+50 8
+50 9
+50 10
+50 11
+50 12
+50 13
+50 14
+50 15
+50 16
+50 18
+50 19
+50 20
+50 21
+50 22
+50 23
+50 24
+50 28
+50 29
+50 30
+50 31
+50 32
+50 33
+50 34
+50 35
+50 36
+50 37
+50 38
+50 39
+50 40
+50 41
+50 42
+50 43
+50 44
+50 45
+50 46
+50 47
+50 48
+50 49
+50 50
+50 51
+50 52
+50 53
+50 54
+50 55
+50 56
+50 57
+50 58
+51 0
+51 1
+51 2
+51 3
+51 4
+51 5
+51 6
+51 7
+51 8
+51 9
+51 10
+51 11
+51 12
+51 13
+51 14
+51 15
+51 16
+51 17
+51 18
+51 19
+51 20
+51 21
+51 22
+51 23
+51 24
+51 25
+51 26
+51 27
+51 28
+51 29
+51 30
+51 31
+51 32
+51 33
+51 34
+51 35
+51 36
+51 37
+51 38
+51 39
+51 40
+51 41
+51 42
+51 43
+51 44
+51 45
+51 46
+51 47
+51 48
+51 49
+51 50
+51 51
+51 52
+51 53
+51 54
+51 55
+51 56
+51 57
+51 58
+52 0
+52 1
+52 2
+52 3
+52 4
+52 5
+52 6
+52 7
+52 8
+52 9
+52 10
+52 11
+52 12
+52 13
+52 14
+52 15
+52 16
+52 17
+52 18
+52 19
+52 20
+52 21
+52 22
+52 23
+52 24
+52 25
+52 26
+52 27
+52 28
+52 29
+52 30
+52 31
+52 32
+52 33
+52 34
+52 35
+52 36
+52 37
+52 38
+52 39
+52 40
+52 41
+52 42
+52 43
+52 44
+52 45
+52 46
+52 47
+52 48
+52 49
+52 50
+52 51
+52 52
+52 53
+52 54
+52 55
+52 56
+52 57
+52 58
+53 0
+53 1
+53 2
+53 3
+53 4
+53 5
+53 6
+53 7
+53 8
+53 9
+53 10
+53 11
+53 12
+53 13
+53 14
+53 15
+53 16
+53 17
+53 18
+53 19
+53 20
+53 21
+53 22
+53 23
+53 24
+53 25
+53 26
+53 27
+53 28
+53 29
+53 30
+53 31
+53 32
+53 33
+53 34
+53 35
+53 36
+53 37
+53 38
+53 39
+53 40
+53 41
+53 42
+53 43
+53 44
+53 45
+53 46
+53 47
+53 48
+53 49
+53 50
+53 51
+53 52
+53 53
+53 54
+53 55
+53 56
+53 57
+53 58
+54 0
+54 1
+54 2
+54 3
+54 4
+54 5
+54 6
+54 7
+54 8
+54 9
+54 10
+54 11
+54 12
+54 13
+54 14
+54 15
+54 16
+54 17
+54 18
+54 19
+54 20
+54 21
+54 22
+54 23
+54 24
+54 25
+54 26
+54 27
+54 28
+54 29
+54 30
+54 31
+54 32
+54 33
+54 34
+54 35
+54 36
+54 37
+54 38
+54 39
+54 40
+54 41
+54 42
+54 43
+54 44
+54 45
+54 46
+54 47
+54 48
+54 49
+54 50
+54 51
+54 52
+54 53
+54 54
+54 55
+54 56
+54 57
+54 58
+55 0
+55 1
+55 2
+55 3
+55 4
+55 5
+55 6
+55 7
+55 8
+55 9
+55 10
+55 11
+55 12
+55 13
+55 14
+55 15
+55 16
+55 17
+55 18
+55 19
+55 20
+55 21
+55 22
+55 23
+55 24
+55 25
+55 26
+55 27
+55 28
+55 29
+55 30
+55 31
+55 32
+55 33
+55 34
+55 35
+55 36
+55 37
+55 38
+55 39
+55 40
+55 41
+55 42
+55 43
+55 44
+55 45
+55 46
+55 47
+55 48
+55 49
+55 50
+55 51
+55 52
+55 53
+55 54
+55 55
+55 56
+55 57
+55 58
+56 0
+56 1
+56 2
+56 3
+56 4
+56 5
+56 6
+56 7
+56 8
+56 9
+56 10
+56 11
+56 12
+56 13
+56 14
+56 15
+56 16
+56 17
+56 18
+56 19
+56 20
+56 21
+56 22
+56 23
+56 24
+56 25
+56 26
+56 27
+56 28
+56 29
+56 30
+56 31
+56 32
+56 33
+56 34
+56 35
+56 36
+56 37
+56 38
+56 39
+56 40
+56 41
+56 42
+56 43
+56 44
+56 45
+56 46
+56 47
+56 48
+56 49
+56 50
+56 51
+56 52
+56 53
+56 54
+56 55
+56 56
+56 57
+56 58
+57 0
+57 1
+57 2
+57 3
+57 4
+57 5
+57 6
+57 7
+57 8
+57 9
+57 10
+57 11
+57 12
+57 13
+57 14
+57 15
+57 16
+57 17
+57 18
+57 19
+57 20
+57 21
+57 22
+57 23
+57 24
+57 25
+57 26
+57 27
+57 28
+57 29
+57 30
+57 31
+57 32
+57 33
+57 34
+57 35
+57 36
+57 37
+57 38
+57 39
+57 40
+57 41
+57 42
+57 43
+57 44
+57 45
+57 46
+57 47
+57 48
+57 49
+57 50
+57 51
+57 52
+57 53
+57 54
+57 55
+57 56
+57 57
+57 58
+58 0
+58 1
+58 2
+58 3
+58 4
+58 5
+58 6
+58 7
+58 8
+58 9
+58 10
+58 11
+58 12
+58 13
+58 14
+58 15
+58 16
+58 17
+58 18
+58 19
+58 20
+58 21
+58 22
+58 23
+58 24
+58 25
+58 26
+58 27
+58 28
+58 29
+58 30
+58 31
+58 32
+58 33
+58 34
+58 35
+58 36
+58 37
+58 38
+58 39
+58 40
+58 41
+58 42
+58 43
+58 44
+58 45
+58 46
+58 47
+58 48
+58 49
+58 50
+58 51
+58 52
+58 53
+58 54
+58 55
+58 56
+58 57
+58 58
diff --git a/ConsoleApp/Output/SquareDetectedMines.txt b/ConsoleApp/Output/SquareDetectedMines.txt
new file mode 100644
index 0000000..9dbce08
--- /dev/null
+++ b/ConsoleApp/Output/SquareDetectedMines.txt
@@ -0,0 +1,34 @@
+48 7
+47 13
+49 16
+35 8
+12 8
+31 14
+28 20
+36 14
+42 18
+42 23
+42 29
+49 27
+54 29
+45 23
+6 22
+5 18
+9 31
+10 28
+10 34
+16 39
+19 27
+26 40
+33 42
+38 48
+34 51
+36 51
+30 50
+26 49
+27 54
+29 54
+45 48
+52 53
+50 42
+12 49
diff --git a/ConsoleApp/Output/SquarePath.txt b/ConsoleApp/Output/SquarePath.txt
new file mode 100644
index 0000000..8d00889
--- /dev/null
+++ b/ConsoleApp/Output/SquarePath.txt
@@ -0,0 +1,1045 @@
+0 0
+1 0
+2 0
+3 0
+4 0
+5 0
+6 0
+7 0
+8 0
+9 0
+10 0
+11 0
+12 0
+13 0
+14 0
+15 0
+16 0
+17 0
+18 0
+19 0
+20 0
+21 0
+22 0
+23 0
+24 0
+25 0
+26 0
+27 0
+28 0
+29 0
+30 0
+31 0
+32 0
+33 0
+34 0
+35 0
+36 0
+37 0
+38 0
+39 0
+40 0
+41 0
+42 0
+43 0
+44 0
+45 0
+46 0
+47 0
+48 0
+49 0
+50 0
+51 0
+52 0
+53 0
+54 0
+55 0
+56 0
+57 0
+58 0
+58 1
+58 2
+58 3
+58 4
+58 5
+58 6
+58 7
+57 7
+56 7
+55 7
+54 7
+53 7
+52 7
+51 7
+52 7
+52 8
+52 9
+52 10
+52 11
+51 11
+50 11
+51 11
+51 12
+51 13
+51 12
+51 11
+51 10
+52 10
+52 9
+52 8
+52 7
+52 6
+52 5
+52 4
+51 4
+51 3
+50 3
+49 3
+48 3
+47 3
+46 3
+45 3
+45 4
+44 4
+43 4
+42 4
+42 5
+42 6
+42 7
+41 7
+40 7
+39 7
+38 7
+39 7
+39 6
+39 5
+38 5
+38 4
+37 4
+36 4
+35 4
+34 4
+33 4
+32 4
+31 4
+31 5
+31 6
+31 7
+30 7
+29 7
+28 7
+27 7
+26 7
+25 7
+24 7
+23 7
+22 7
+21 7
+20 7
+19 7
+18 7
+17 7
+16 7
+15 7
+16 7
+16 6
+16 5
+15 5
+15 4
+14 4
+13 4
+12 4
+11 4
+10 4
+9 4
+8 4
+8 5
+8 6
+8 7
+7 7
+6 7
+5 7
+4 7
+3 7
+2 7
+1 7
+0 7
+0 8
+0 9
+0 10
+0 11
+0 12
+0 13
+0 14
+1 14
+2 14
+3 14
+4 14
+5 14
+6 14
+7 14
+8 14
+9 14
+10 14
+11 14
+12 14
+13 14
+14 14
+15 14
+16 14
+17 14
+18 14
+19 14
+20 14
+21 14
+22 14
+23 14
+24 14
+25 14
+26 14
+27 14
+28 14
+27 14
+27 15
+27 16
+27 17
+27 16
+26 16
+25 16
+24 16
+23 16
+23 17
+23 18
+23 19
+23 20
+24 20
+24 21
+24 22
+24 23
+25 23
+25 24
+26 24
+27 24
+28 24
+29 24
+30 24
+31 24
+31 23
+32 23
+32 22
+32 21
+32 20
+32 19
+32 18
+33 18
+34 18
+34 17
+34 18
+35 18
+36 18
+37 18
+38 18
+39 18
+38 18
+38 19
+38 20
+38 21
+38 22
+39 22
+38 22
+38 23
+38 24
+38 25
+38 26
+39 26
+39 27
+38 27
+38 28
+38 29
+38 30
+38 31
+38 32
+39 32
+39 33
+40 33
+41 33
+42 33
+43 33
+44 33
+45 33
+45 32
+46 32
+46 31
+46 30
+46 29
+46 30
+46 31
+47 31
+48 31
+49 31
+50 31
+51 31
+51 32
+51 33
+51 34
+51 35
+52 35
+53 35
+54 35
+54 34
+55 34
+55 33
+56 33
+57 33
+57 32
+58 32
+58 31
+58 30
+58 29
+58 28
+58 27
+58 26
+57 26
+57 25
+56 25
+55 25
+54 25
+54 24
+54 23
+54 22
+54 21
+54 20
+54 19
+54 18
+54 17
+54 16
+54 15
+54 14
+55 14
+56 14
+57 14
+58 14
+58 15
+58 16
+58 17
+58 18
+58 19
+58 20
+58 21
+57 21
+56 21
+55 21
+54 21
+53 21
+52 21
+51 21
+50 21
+49 21
+48 21
+49 21
+50 21
+51 21
+52 21
+53 21
+54 21
+55 21
+56 21
+57 21
+58 21
+59 21
+59 22
+59 23
+59 24
+59 25
+59 26
+59 27
+59 28
+59 29
+59 30
+59 31
+59 32
+59 33
+58 33
+57 33
+56 33
+55 33
+54 33
+53 33
+52 33
+51 33
+50 33
+49 33
+48 33
+47 33
+46 33
+45 33
+44 33
+43 33
+42 33
+41 33
+40 33
+39 33
+38 33
+38 32
+38 31
+38 30
+38 29
+38 28
+38 27
+38 26
+38 25
+38 24
+38 23
+38 22
+38 21
+37 21
+36 21
+35 21
+34 21
+33 21
+32 21
+32 21
+32 21
+32 22
+32 23
+31 23
+31 24
+30 24
+29 24
+28 24
+27 24
+26 24
+25 24
+24 24
+24 23
+24 22
+24 21
+23 21
+22 21
+21 21
+20 21
+19 21
+18 21
+17 21
+16 21
+15 21
+14 21
+13 21
+12 21
+11 21
+10 21
+9 21
+10 21
+10 20
+10 19
+9 19
+9 18
+8 18
+9 18
+9 17
+9 16
+9 15
+8 15
+8 14
+7 14
+6 14
+5 14
+4 14
+3 14
+2 14
+1 14
+1 15
+1 16
+1 17
+1 18
+1 19
+1 20
+1 21
+0 21
+0 22
+0 23
+0 24
+0 25
+0 26
+0 27
+0 28
+1 28
+2 28
+3 28
+4 28
+5 28
+6 28
+7 28
+6 28
+5 28
+5 29
+5 30
+5 31
+5 32
+5 33
+5 34
+6 34
+6 35
+7 35
+6 35
+6 36
+6 37
+7 37
+7 38
+8 38
+9 38
+10 38
+11 38
+12 38
+13 38
+12 38
+12 39
+12 40
+12 41
+12 42
+13 42
+13 43
+14 43
+15 43
+16 43
+17 43
+18 43
+19 43
+19 42
+20 42
+20 41
+20 40
+20 39
+20 38
+20 37
+20 36
+19 36
+19 35
+18 35
+17 35
+16 35
+16 34
+16 33
+16 32
+16 31
+16 30
+16 29
+16 30
+16 31
+17 31
+18 31
+19 31
+20 31
+21 31
+22 31
+22 30
+23 30
+23 29
+23 28
+24 28
+25 28
+26 28
+27 28
+28 28
+29 28
+30 28
+31 28
+32 28
+33 28
+34 28
+35 28
+36 28
+37 28
+38 28
+38 28
+38 28
+38 29
+38 30
+38 31
+38 32
+39 32
+39 33
+40 33
+41 33
+42 33
+43 33
+44 33
+45 33
+46 33
+47 33
+48 33
+49 33
+50 33
+51 33
+52 33
+53 33
+54 33
+55 33
+56 33
+57 33
+57 32
+58 32
+58 31
+58 30
+58 29
+58 28
+58 29
+58 30
+58 31
+58 32
+58 33
+58 34
+58 35
+57 35
+56 35
+55 35
+54 35
+53 35
+52 35
+51 35
+50 35
+49 35
+48 35
+47 35
+46 35
+45 35
+44 35
+43 35
+42 35
+41 35
+40 35
+39 35
+38 35
+37 35
+36 35
+35 35
+34 35
+33 35
+32 35
+31 35
+30 35
+29 35
+28 35
+27 35
+26 35
+25 35
+24 35
+23 35
+22 35
+21 35
+20 35
+19 35
+18 35
+17 35
+16 35
+15 35
+14 35
+14 35
+14 35
+15 35
+16 35
+17 35
+18 35
+19 35
+19 36
+20 36
+20 37
+20 38
+20 39
+20 40
+20 41
+20 42
+19 42
+19 43
+18 43
+17 43
+16 43
+15 43
+14 43
+13 43
+12 43
+11 43
+10 43
+9 43
+8 43
+7 43
+6 43
+6 42
+6 41
+6 40
+6 39
+6 38
+6 37
+6 36
+6 35
+5 35
+4 35
+3 35
+2 35
+1 35
+0 35
+0 36
+0 37
+0 38
+0 39
+0 40
+0 41
+0 42
+1 42
+2 42
+3 42
+4 42
+5 42
+6 42
+7 42
+8 42
+9 42
+10 42
+11 42
+12 42
+13 42
+13 42
+14 43
+15 43
+16 43
+17 43
+18 43
+19 43
+19 42
+20 42
+21 42
+22 42
+23 42
+23 43
+23 44
+24 44
+25 44
+26 44
+27 44
+28 44
+29 44
+29 43
+30 43
+29 43
+29 44
+29 45
+30 45
+30 46
+31 46
+32 46
+33 46
+34 46
+35 46
+34 46
+34 47
+34 48
+34 47
+33 47
+32 47
+32 46
+31 46
+30 46
+29 46
+28 46
+28 45
+27 45
+26 45
+25 45
+24 45
+23 45
+22 45
+22 46
+22 47
+22 48
+22 49
+22 50
+22 51
+22 52
+23 52
+23 53
+24 53
+23 53
+23 54
+23 55
+23 56
+23 57
+24 57
+24 58
+25 58
+26 58
+27 58
+28 58
+29 58
+30 58
+30 57
+30 58
+31 58
+32 58
+33 58
+34 58
+34 57
+34 56
+34 55
+35 55
+36 55
+37 55
+38 55
+39 55
+39 54
+40 54
+40 53
+40 52
+41 52
+41 51
+42 51
+42 50
+42 51
+42 52
+43 52
+44 52
+45 52
+46 52
+47 52
+48 52
+48 51
+49 51
+49 50
+49 49
+49 48
+49 47
+49 46
+49 45
+49 46
+50 46
+51 46
+52 46
+53 46
+53 45
+54 45
+54 44
+54 43
+54 42
+54 41
+54 40
+54 39
+53 39
+53 38
+52 38
+51 38
+50 38
+49 38
+48 38
+47 38
+47 39
+46 39
+46 40
+46 41
+46 42
+46 42
+46 42
+46 41
+46 40
+46 39
+47 39
+47 38
+48 38
+49 38
+50 38
+51 38
+52 38
+53 38
+53 39
+54 39
+54 40
+54 41
+54 42
+55 42
+56 42
+57 42
+58 42
+58 43
+58 44
+58 45
+58 46
+58 47
+58 48
+58 49
+57 49
+56 49
+55 49
+54 49
+53 49
+52 49
+51 49
+50 49
+49 49
+49 49
+49 49
+50 49
+51 49
+52 49
+53 49
+54 49
+55 49
+56 49
+57 49
+58 49
+59 49
+59 50
+59 51
+59 52
+59 53
+58 53
+57 53
+56 53
+56 54
+56 55
+56 56
+55 56
+55 57
+54 57
+53 57
+52 57
+51 57
+50 57
+49 57
+48 57
+47 57
+46 57
+45 57
+44 57
+43 57
+43 58
+42 58
+41 58
+40 58
+39 58
+38 58
+37 58
+36 58
+35 58
+34 58
+33 58
+32 58
+31 58
+30 58
+29 58
+28 58
+27 58
+26 58
+25 58
+24 58
+23 58
+22 58
+22 57
+22 56
+22 55
+22 54
+22 53
+22 52
+22 51
+22 50
+22 49
+21 49
+20 49
+19 49
+18 49
+17 49
+16 49
+15 49
+16 49
+16 50
+16 51
+16 52
+16 53
+15 53
+14 53
+13 53
+12 53
+11 53
+10 53
+9 53
+8 53
+8 52
+8 51
+8 50
+8 49
+7 49
+6 49
+5 49
+4 49
+3 49
+2 49
+1 49
+0 49
+0 50
+0 51
+0 52
+0 53
+0 54
+0 55
+0 56
+1 56
+2 56
+3 56
+4 56
+5 56
+6 56
+7 56
+8 56
+9 56
+10 56
+11 56
+12 56
+13 56
+14 56
+15 56
+16 56
+17 56
+18 56
+19 56
+20 56
+21 56
+22 56
+23 56
+23 56
+24 57
+24 58
+25 58
+26 58
+27 58
+28 58
+29 58
+30 58
+31 58
+32 58
+32 57
+33 57
+33 56
+34 56
+35 56
+36 56
+37 56
+38 56
+39 56
+40 56
+41 56
+42 56
+43 56
+44 56
+45 56
+46 56
+47 56
+48 56
+49 56
+49 56
+50 57
+51 57
+52 57
+53 57
+54 57
+55 57
+55 56
+56 56
+57 56
+58 56
diff --git a/ConsoleApp/Output/SquareTest.png b/ConsoleApp/Output/SquareTest.png
new file mode 100644
index 0000000..d7efa5f
Binary files /dev/null and b/ConsoleApp/Output/SquareTest.png differ
diff --git a/ConsoleApp/PathPlanners/IReactivePathPlanner.cs b/ConsoleApp/PathPlanners/IReactivePathPlanner.cs
index 404d781..9a0845e 100644
--- a/ConsoleApp/PathPlanners/IReactivePathPlanner.cs
+++ b/ConsoleApp/PathPlanners/IReactivePathPlanner.cs
@@ -8,5 +8,10 @@ namespace ConsoleApp.PathPlanners
{
Queue ReactiveHexPath { get; }
void GenerateReactiveHexPath(IHexMap hexMap, Queue optimalPath, Coordinate2D vehicleCurrentHexCell);
+
+ Queue ReactiveSquarePath { get; }
+
+ void GenerateReactiveSquarePath(ISquareMap squareMap, Queue optimalPath,
+ ICell vehicleCurrentSquareCell);
}
}
\ No newline at end of file
diff --git a/ConsoleApp/PathPlanners/PathPlanner.cs b/ConsoleApp/PathPlanners/PathPlanner.cs
index d195b27..fe7d532 100644
--- a/ConsoleApp/PathPlanners/PathPlanner.cs
+++ b/ConsoleApp/PathPlanners/PathPlanner.cs
@@ -11,49 +11,49 @@ namespace ConsoleApp.PathPlanners
{
public Queue GenerateOptimalSquarePath(ISquareMap map, IVehicle vehicle)
{
- var path = new Queue();
- var myCell = map.StartingCell;
+ var currentPostion = vehicle.CurrentSquareCell;
+ var currentHeading = GlobalDirection.East;
var finished = false;
- var width_cm = (double)(vehicle.DetectorRadius) * 100 * 2;
- var swathOffset = (int)Math.Floor((decimal) (width_cm) / 25) + 1;
- var currentHeading = GlobalDirection.North;
+ var path = new List();
while (!finished)
{
- var availableMoves = map.PossibleMoves(myCell);
- if (availableMoves.Contains(GlobalDirection.North) && currentHeading == GlobalDirection.North &&
- myCell.Y != map.Height)
+ //Heading East
+ if (currentHeading == GlobalDirection.East)
{
- path.Enqueue(map.GetCell(myCell.X, myCell.Y + 1));
- myCell = map.GetCell(myCell.X, myCell.Y + 1);
+ path.AddRange(
+ map.GetShortestPath(currentPostion, map.GetCell(map.Width - 1, currentPostion.Y)));
+ currentPostion = new Cell(map.Width - 1, currentPostion.Y);
}
- else if (availableMoves.Contains(GlobalDirection.South) && currentHeading == GlobalDirection.South && myCell.Y != 0)
+ //Heading West
+ else if (currentHeading == GlobalDirection.West)
{
- path.Enqueue(map.GetCell(myCell.X, myCell.Y - 1));
- myCell = map.GetCell(myCell.X, myCell.Y - 1);
+ path.AddRange(
+ map.GetShortestPath(currentPostion, map.GetCell(0, currentPostion.Y)));
+ currentPostion = new Cell(0, currentPostion.Y);
}
- else
+ //Check for finish
+ if (currentPostion.Y + (vehicle.DetectorRadius * 2) >= map.Height)
{
- if (myCell.X + swathOffset >= map.Width)
- {
- finished = true;
- }
- else
- {
- for (int i = myCell.X; i < myCell.X + swathOffset; i++)
- {
- path.Enqueue(map.GetCell(i, myCell.Y));
- }
- myCell = map.GetCell(myCell.X+swathOffset, myCell.Y);
- if (currentHeading == GlobalDirection.North)
- currentHeading = GlobalDirection.South;
- else if (currentHeading == GlobalDirection.South)
- currentHeading = GlobalDirection.North;
- }
+ finished = true;
+ continue;
}
+
+ //Move up X Axis
+ path.AddRange(
+ map.GetShortestPath(
+ currentPostion,
+ map.GetCell(currentPostion.X, currentPostion.Y + (vehicle.DetectorRadius * 2) - 1)));
+ currentPostion = new Cell(currentPostion.X, currentPostion.Y + (vehicle.DetectorRadius * 2) -1);
+ if (currentHeading == GlobalDirection.East)
+ currentHeading = GlobalDirection.West;
+ else
+ currentHeading = GlobalDirection.East;
+
}
- return path;
+
+ return new Queue(path);
}
public Queue GenerateOptimalHexPath(IHexMap hexMap, IVehicle vehicle)
diff --git a/ConsoleApp/PathPlanners/ReactivePathPlanner.cs b/ConsoleApp/PathPlanners/ReactivePathPlanner.cs
index 258bd4d..9c42596 100644
--- a/ConsoleApp/PathPlanners/ReactivePathPlanner.cs
+++ b/ConsoleApp/PathPlanners/ReactivePathPlanner.cs
@@ -7,12 +7,17 @@ namespace ConsoleApp.PathPlanners
public class ReactivePathPlanner : IReactivePathPlanner
{
private Queue _reactiveHexPath;
+ private Queue _reactiveSquarePath;
public Queue ReactiveHexPath => _reactiveHexPath;
+ public Queue ReactiveSquarePath => _reactiveSquarePath;
+
public ReactivePathPlanner()
{
_reactiveHexPath = new Queue();
+ _reactiveSquarePath = new Queue();
+
}
public void GenerateReactiveHexPath(IHexMap hexMap, Queue optimalPath,
Coordinate2D vehicleCurrentHexCell)
@@ -39,6 +44,33 @@ namespace ConsoleApp.PathPlanners
_reactiveHexPath.Enqueue(node);
}
}
-
+
+
+ public void GenerateReactiveSquarePath(ISquareMap squareMap, Queue optimalPath,
+ ICell vehicleCurrentSquareCell)
+ {
+ //Clean out old path
+ _reactiveSquarePath.Clear();
+
+ //If the optimal path is empty well we are done, otherwise pop 1
+ if (!optimalPath.TryDequeue(out ICell convergentPoint))
+ return;
+
+ //Dequeue until the cell is not blocked
+ while (squareMap.GetCell(convergentPoint.X, convergentPoint.Y).Blocked)
+ {
+ //if optimal path is empty were done and we can not clear around this position, otherwise
+ //lest pop another.
+ if (!optimalPath.TryDequeue(out convergentPoint))
+ return;
+ }
+
+ var map = (SquareMap)squareMap;
+ var reactivePath = map.GetShortestPath(vehicleCurrentSquareCell, convergentPoint);
+ foreach (var node in reactivePath)
+ {
+ _reactiveSquarePath.Enqueue(node);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Program.cs b/ConsoleApp/Program.cs
index d90d0e7..684cbab 100644
--- a/ConsoleApp/Program.cs
+++ b/ConsoleApp/Program.cs
@@ -19,6 +19,7 @@ namespace ConsoleApp
_userConsole = new UserConsole();
Initialization();
simResults.WriteResults();
+ GenerateImages();
Console.WriteLine("Program Completed");
}
@@ -26,19 +27,10 @@ namespace ConsoleApp
private static void Initialization()
{
- _userConsole.PrintStartMenu();
- var input = UserConsole.GetUserInput();
- if (input == "1")
- {
- var (x,y) = _userConsole.GetMapDimensions();
- var minePercentage = UserConsole.GetMinePercentage();
- RunSimulation(x, y, minePercentage);
- }
- else
- {
- UserConsole.PrintInvalidInput();
- Initialization();
- }
+ var (x,y) = _userConsole.GetMapDimensions();
+ var minePercentage = 1;
+ RunSimulation(x, y, minePercentage);
+
}
private static void RunSimulation(int x, int y, double minePercentage)
@@ -49,6 +41,26 @@ namespace ConsoleApp
mapFactory.GenerateMaps(x, y, minePercentage);
simRunner.Run();
}
+
+ private static void GenerateImages()
+ {
+ var file = Path.Combine("./",Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"plotGraphs.py");
+ ProcessStartInfo startInfo = new ProcessStartInfo()
+ {
+ FileName = "python3",
+ Arguments = file,
+ UseShellExecute = true
+ };
+ Process proc = new Process()
+ {
+ StartInfo = startInfo,
+ };
+ proc.Start();
+ while (!proc.HasExited)
+ {
+ Thread.Sleep(500);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Sim/DetectionHead.cs b/ConsoleApp/Sim/DetectionHead.cs
index f9d4c12..14b6390 100644
--- a/ConsoleApp/Sim/DetectionHead.cs
+++ b/ConsoleApp/Sim/DetectionHead.cs
@@ -24,6 +24,6 @@ namespace ConsoleApp.Sim
public static List GetCoveredCells(
ISquareMap squareMap,
Cell centerCell,
- int detectorRadius) => squareMap.GetRange(centerCell, detectorRadius);
+ int detectorRadius) => squareMap.GetRange(centerCell, detectorRadius * 2 - detectorRadius%2);
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Sim/IVehicle.cs b/ConsoleApp/Sim/IVehicle.cs
index 95c1a01..aca35bb 100644
--- a/ConsoleApp/Sim/IVehicle.cs
+++ b/ConsoleApp/Sim/IVehicle.cs
@@ -10,6 +10,6 @@ namespace ConsoleApp.Sim
int TurnRadius { get; }
int DetectorRadius { get;}
Coordinate2D CurrentHexCell { get; set; }
- ICell CurrentSquareCell { get; set; }
+ Cell CurrentSquareCell { get; set; }
}
}
\ No newline at end of file
diff --git a/ConsoleApp/Sim/Vehicle.cs b/ConsoleApp/Sim/Vehicle.cs
index e1424a2..f294bfd 100644
--- a/ConsoleApp/Sim/Vehicle.cs
+++ b/ConsoleApp/Sim/Vehicle.cs
@@ -11,7 +11,7 @@ namespace ConsoleApp.Sim
public int TurnRadius { get; }
public int DetectorRadius { get;}
public HexCore.Coordinate2D CurrentHexCell { get; set; }
- public ICell CurrentSquareCell { get; set; }
+ public Cell CurrentSquareCell { get; set; }
diff --git a/ConsoleApp/Sim/VehicleConfiguration.json b/ConsoleApp/Sim/VehicleConfiguration.json
index 8db1cfd..9e1820f 100644
--- a/ConsoleApp/Sim/VehicleConfiguration.json
+++ b/ConsoleApp/Sim/VehicleConfiguration.json
@@ -1,5 +1,5 @@
{
"Length": 1,
"Width": 1,
- "DetectorRadius": 1
+ "DetectorRadius": 2
}
diff --git a/ConsoleApp/SimRunner.cs b/ConsoleApp/SimRunner.cs
index 66a089d..0f4165b 100644
--- a/ConsoleApp/SimRunner.cs
+++ b/ConsoleApp/SimRunner.cs
@@ -1,16 +1,10 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
-using System.Net;
-using System.Threading;
-using System.Threading.Tasks;
using ConsoleApp.Maps;
using ConsoleApp.PathPlanners;
using ConsoleApp.Sim;
using HexCore;
-using ImTools;
-using Microsoft.VisualBasic;
namespace ConsoleApp
{
@@ -23,8 +17,9 @@ namespace ConsoleApp
private IMineMap _mineMap;
private IReactivePathPlanner _reactivePathPlanner;
private HashSet hexBombsFound = new HashSet();
- private List testingPath = new List();
private ISimulationResults _simulationResults;
+ private HashSet squareBombsFound = new HashSet();
+
public SimRunner(IMapFactory mapFactory, IVehicle vehicle, IPathPlanner pathPlanner, IReactivePathPlanner reactivePathPlanner, ISimulationResults simulationResults)
@@ -47,6 +42,8 @@ namespace ConsoleApp
}
+ #region HexSimulation
+
private void HexSimulation()
{
var hexMap = _mapFactory.GetHexMap();
@@ -80,7 +77,7 @@ namespace ConsoleApp
if (!optimalPath.TryDequeue(out var nextOptimal))
{
finished = true;
- break;
+ continue;
}
if (hexMap.Graph.IsCellBlocked(nextOptimal))
@@ -99,6 +96,13 @@ namespace ConsoleApp
_simulationResults.HexUnClearedCells = uncleared;
_simulationResults.HexTotalMoves = totalMoves;
_simulationResults.HexBombsFound = hexBombsFound.Count;
+ _simulationResults.HexMappedBombs = hexBombsFound.ToList();
+
+ foreach (var cell in hexMap.Graph.GetAllCells())
+ {
+ if(cell.TerrainType.Id == hexMap.ClearedTerrain.Id)
+ _simulationResults.HexCoveredCells.Add(cell.Coordinate3.To2D(hexMap.OffsetType));
+ }
}
private (int, int) CoveredCells()
@@ -137,14 +141,113 @@ namespace ConsoleApp
hexMap.Graph.BlockCells(cellsToBlock);
}
+ #endregion
-
+ #region SquareSimulation
private void SquareSimulation()
{
var squareMap = _mapFactory.GetSquareMap();
_vehicle.CurrentSquareCell = squareMap.StartingCell;
var optimalPath = _pathPlanner.GenerateOptimalSquarePath(squareMap, _vehicle);
+ var finished = false;
+ while (!finished)
+ {
+ _simulationResults.SquareTotalMoves++;
+ _simulationResults.SquarePath.Add(_vehicle.CurrentSquareCell);
+ var detector = squareMap.GetRange(_vehicle.CurrentSquareCell, _vehicle.DetectorRadius);
+ var detection = CheckForMines(detector);
+ //Mark cells as covered.
+ foreach (var cell in detector)
+ {
+ cell.Coverage = Coverage.Covered;
+ }
+ if (detection)
+ _reactivePathPlanner.GenerateReactiveSquarePath(squareMap, optimalPath, _vehicle.CurrentSquareCell);
+ if (_reactivePathPlanner.ReactiveSquarePath.TryDequeue(out var next))
+ {
+ _vehicle.CurrentSquareCell = (Cell) next;
+ }
+ else
+ {
+ if (!optimalPath.TryDequeue(out var current))
+ {
+ finished = true;
+ continue;
+ }
+
+ if (current.Blocked)
+ {
+ _reactivePathPlanner.GenerateReactiveSquarePath(squareMap, optimalPath, current);
+ }
+ else
+ _vehicle.CurrentSquareCell = (Cell) current;
+ }
+ }
+
+ //Debugging information
+ var (cleared, uncleared) = CoveredSquareCells();
+ _simulationResults.SquareCellsCleared = cleared;
+ _simulationResults.SquareCellsUncleared = uncleared;
+ _simulationResults.SquareBombsFound = squareBombsFound.Count;
+ _simulationResults.SquareMappedBombs = squareBombsFound.ToList();
+
+ foreach (var cell in squareMap.Map)
+ {
+ if (cell.Coverage == Coverage.Covered)
+ {
+ _simulationResults.SquareCoveredCells.Add(cell);
+ }
+ }
+
}
+ private (int, int) CoveredSquareCells()
+ {
+ var cleared = 0;
+ var uncleared = 0;
+ var map = _mapFactory.GetSquareMap();
+ foreach (var cellState in map.Map)
+ {
+ switch (cellState.Coverage)
+ {
+ case Coverage.Covered:
+ cleared++;
+ break;
+ case Coverage.Uncovered:
+ uncleared++;
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
+ }
+ }
+
+ return (cleared, uncleared);
+ }
+
+ private bool CheckForMines(List detector)
+ {
+ var found = false;
+ foreach (var cell in detector.Where(cell => _mineMap.GetCell(cell.X, cell.Y)))
+ {
+ if(!squareBombsFound.Add(cell)) continue;
+ found = true;
+ BlockSquareCells(cell);
+ }
+
+ return found;
+ }
+
+ private void BlockSquareCells(Cell cell)
+ {
+ var map = _mapFactory.GetSquareMap();
+ var cellsToBlock = map.GetRange(cell, _vehicle.DetectorRadius);
+ foreach (var blockCell in cellsToBlock)
+ {
+ blockCell.Blocked = true;
+ }
+ }
+
+ #endregion
+
}
}
\ No newline at end of file
diff --git a/ConsoleApp/SimulationResults.cs b/ConsoleApp/SimulationResults.cs
index c2a2ca8..d008cfa 100644
--- a/ConsoleApp/SimulationResults.cs
+++ b/ConsoleApp/SimulationResults.cs
@@ -18,6 +18,15 @@ namespace ConsoleApp
public List Mines { get; set; }
public int HexClearedCells { get; set; }
public int HexUnClearedCells { get; set; }
+
+ public List SquarePath { get; set; }
+ public List SquareMappedBombs { get; set; }
+ public int SquareCellsUncleared { get; set; }
+ public int SquareCellsCleared { get; set; }
+ public int SquareBombsFound { get; set; }
+ public int SquareTotalMoves { get; set; }
+ public List SquareCoveredCells { get; set; }
+ public List HexCoveredCells { get; set; }
public SimulationResults()
{
@@ -29,6 +38,15 @@ namespace ConsoleApp
Mines = new List| ();
HexClearedCells = 0;
HexUnClearedCells = 0;
+ SquarePath = new List();
+ SquareMappedBombs = new List();
+ SquareCellsUncleared = 0;
+ SquareCellsCleared = 0;
+ SquareBombsFound = 0;
+ SquareTotalMoves = 0;
+ SquareCoveredCells = new List();
+ HexCoveredCells = new List();
+
}
public void WriteResults()
@@ -37,28 +55,9 @@ namespace ConsoleApp
WriteMines();
WritePaths();
WriteDetectedMines();
- GenerateImages();
+ WriteCoveredCells();
}
- private static void GenerateImages()
- {
- var file = Path.Combine("./",Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"HexPlot.py");
- ProcessStartInfo startInfo = new ProcessStartInfo()
- {
- FileName = "python3",
- Arguments = file,
- UseShellExecute = true
- };
- Process proc = new Process()
- {
- StartInfo = startInfo,
- };
- proc.Start();
- while (!proc.HasExited)
- {
- Thread.Sleep(500);
- }
- }
private void WriteData()
{
@@ -71,9 +70,19 @@ namespace ConsoleApp
tw.WriteLine($"\t Bombs Found: {HexBombsFound}");
tw.WriteLine($"\t Cleared Cell Count: {HexClearedCells}");
tw.WriteLine($"\t Uncleared Cell Count: {HexUnClearedCells}");
+ tw.WriteLine($"\t Percentage Cleared: {(double)HexClearedCells/(HexClearedCells+HexUnClearedCells)*100}");
+ tw.WriteLine($"Square: ");
+ tw.WriteLine($"\t Total Moves: {SquareTotalMoves}");
+ tw.WriteLine($"\t Bombs Found: {SquareBombsFound}");
+ tw.WriteLine($"\t Cleared Cell Count: {SquareCellsCleared}");
+ tw.WriteLine($"\t Uncleared Cell Count: {SquareCellsUncleared}");
+ tw.WriteLine($"\t Percentage Cleared: {(double) SquareCellsCleared / (SquareCellsCleared + SquareCellsUncleared)*100}");
+
}
}
+
+
private void WriteMines()
{
using(TextWriter tw = new StreamWriter("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/Mines.txt"))
@@ -83,11 +92,30 @@ namespace ConsoleApp
}
}
+ private void WriteCoveredCells()
+ {
+ using(TextWriter tw = new StreamWriter("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexCoveredCells.txt"))
+ {
+ foreach (var s in HexCoveredCells)
+ tw.WriteLine($"{s.X} {s.Y}");
+ }
+ using(TextWriter tw = new StreamWriter("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareCoveredCells.txt"))
+ {
+ foreach (var s in SquareCoveredCells)
+ tw.WriteLine($"{s.X} {s.Y}");
+ }
+ }
+
private void WriteDetectedMines()
{
using(TextWriter tw = new StreamWriter("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexDetectedMines.txt"))
{
- foreach (Coordinate2D s in HexMappedBombs)
+ foreach (var s in HexMappedBombs)
+ tw.WriteLine($"{s.X} {s.Y}");
+ }
+ using(TextWriter tw = new StreamWriter("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareDetectedMines.txt"))
+ {
+ foreach (var s in SquareMappedBombs)
tw.WriteLine($"{s.X} {s.Y}");
}
}
@@ -96,9 +124,15 @@ namespace ConsoleApp
{
using(TextWriter tw = new StreamWriter("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexPath.txt"))
{
- foreach (Coordinate2D s in HexPath)
+ foreach (var s in HexPath)
tw.WriteLine($"{s.X} {s.Y}");
}
+ using(TextWriter tw = new StreamWriter("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquarePath.txt"))
+ {
+ foreach (var s in SquarePath)
+ tw.WriteLine($"{s.X} {s.Y}");
+ }
+
}
}
}
\ No newline at end of file
diff --git a/ConsoleApp/UserConsole.cs b/ConsoleApp/UserConsole.cs
index 1eae039..3801a12 100644
--- a/ConsoleApp/UserConsole.cs
+++ b/ConsoleApp/UserConsole.cs
@@ -24,18 +24,18 @@ namespace ConsoleApp
public (int width, int height) GetMapDimensions()
{
- Console.WriteLine($"Enter map width: ");
+ Console.WriteLine($"Enter map width (5-15) meters: ");
var x = GetUserInput();
- if (!int.TryParse(x, out var width))
+ if (!int.TryParse(x, out var width) && width >= 5 && width <= 15)
{
PrintInvalidInput();
GetMapDimensions();
}
- Console.WriteLine($"Enter map height: ");
+ Console.WriteLine($"Enter map height (5-15) meters: ");
var y = GetUserInput();
- if (int.TryParse(y, out var height)) return (width, height);
+ if (int.TryParse(y, out var height) && height >= 5 && height <= 15) return (width, height);
PrintInvalidInput();
GetMapDimensions();
return (width, height);
diff --git a/ConsoleApp/plotGraphs.py b/ConsoleApp/plotGraphs.py
new file mode 100644
index 0000000..921c830
--- /dev/null
+++ b/ConsoleApp/plotGraphs.py
@@ -0,0 +1,107 @@
+import numpy as np
+import matplotlib.pyplot as plt
+import matplotlib
+
+
+if __name__ == "__main__":
+ xc = []
+ yc = []
+ xm = []
+ ym = []
+ xf = []
+ yf = []
+ sxc = []
+ syc = []
+ sxm = []
+ sym = []
+ sxf = []
+ syf = []
+
+ sccx = []
+ sccy = []
+ hccx = []
+ hccy = []
+
+
+
+ with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareCoveredCells.txt") as c:
+ for line in c:
+ x, y = line.split()
+ sccx.append(int(x))
+ sccy.append(int(y))
+
+ with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareDetectedMines.txt") as c:
+ for line in c:
+ x, y = line.split()
+ sxf.append(int(x))
+ syf.append(int(y))
+
+
+ with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexCoveredCells.txt") as c:
+ for line in c:
+ x, y = line.split()
+ hccx.append(int(x))
+ hccy.append(int(y))
+
+ with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexPath.txt") as c:
+ for line in c:
+ x, y = line.split()
+ xc.append(int(x))
+ yc.append(int(y))
+
+ with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquarePath.txt") as c:
+ for line in c:
+ x, y = line.split()
+ sxc.append(int(x))
+ syc.append(int(y))
+
+ with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/Mines.txt") as m:
+ for line in m:
+ x, y = line.split()
+ xm.append(int(x))
+ ym.append(int(y))
+
+ with open("/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexDetectedMines.txt") as f:
+ for line in f:
+ x, y = line.split()
+ xf.append(int(x))
+ yf.append(int(y))
+
+ fig = plt.figure(1)
+ plt.plot(xc, yc, 'h', label='vehicle', color='blue', linestyle='None')
+ plt.plot(xm, ym, 'h', label='all mines', color='red', linestyle='None')
+ plt.plot(xf, yf, 'h', label='detected mines', color='orange', linestyle='None')
+ plt.title('Hex Simulation')
+ plt.legend(loc='lower left', fontsize='xx-small')
+ matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexTest.png')
+
+ plt.plot()
+ plt.close(fig)
+
+ fig = plt.figure(2)
+ plt.plot(sxc, syc, 's', label='vehicle', color='blue', linestyle='None')
+ plt.plot(sxm, sym, 's', label='all mines', color='red', linestyle='None')
+ plt.plot(sxf, syf, 's', label='detected mines', color='orange', linestyle='None')
+ plt.title('Square Simulation')
+ plt.legend(loc='lower left', fontsize='xx-small')
+ matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareTest.png')
+ plt.plot()
+ plt.close(fig)
+
+ fig = plt.figure(3)
+ plt.plot(hccx, hccy, 'h', label='covered cells', color='red', linestyle='None')
+ plt.plot(xf, yf, 'h', label='detected mines', color='blue', linestyle='None')
+ plt.title('Hex Coverage')
+ plt.legend(loc='lower left', fontsize='xx-small')
+ matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/HexCoverage.png')
+ plt.plot()
+ plt.close(fig)
+
+ fig = plt.figure(4)
+ plt.plot(sccx, sccy, 's', label='covered cells', color='red', linestyle='None')
+ plt.plot(sxf, syf, 's', label='detected mines', color='blue', linestyle='None')
+ plt.title('Square Coverage')
+ plt.legend(loc='lower left', fontsize='xx-small')
+ matplotlib.pyplot.savefig('/Users/brady.bodily/Documents/Repositories/CS5890_Robot_Intelligence/RobotIntelFinal/ConsoleApp/Output/SquareCoverage.png')
+ plt.plot()
+ plt.close(fig)
\ No newline at end of file
| | | | | | | | | | | | |