using System.Collections.Generic;
private static List<(int, int)> path;
private static (int x, int y) start;
private static (int x, int y) end;
private static List<(string, string, string, string, string)> maze;
public static void Main()
(string col1, string col2, string col3, string col4, string col5) row1 = ("X","X","X","X","X");
(string col1, string col2, string col3, string col4, string col5) row2 = ("X","X","O","O","E");
(string col1, string col2, string col3, string col4, string col5) row3 = ("X","X","O","X","X");
(string col1, string col2, string col3, string col4, string col5) row4 = ("X","X","O","X","X");
(string col1, string col2, string col3, string col4, string col5) row5 = ("X","X","O","X","X");
(string col1, string col2, string col3, string col4, string col5) row6 = ("X","S","O","X","X");
maze = new List<(string, string, string, string, string)>();
path = new List<(int,int)>();
FindPath(start.x, start.y);
System.Console.WriteLine(path);
public static bool FindPath(int x, int y)
if (x == end.x && y == end.y)
var currentValue = GetCurrentValue(row, y);
private static string GetCurrentValue((string col1, string col2, string col3, string col4, string col5) row, int colIndex)