private bool CheckUp() { bool freeToMove = true; int x = xAxes - 1; int y = yAxes - 1; for (int i = 0; i < 2; i++, y--) { for (int j = 0; j < 3; j++, x++) { if (mazeData.Contains(x, y) || y < 0 || x > rightEdge) { freeToMove = false; if (!freeToMove) { break; } } } if (!freeToMove) { break; } x = xAxes - 1; } return(freeToMove); }
public bool freeToMove(int x, int y) { return(!haveCheched.Contains($"{x},{y}") && mazeData.Contains(x, y)); }