public void CloseSquare(int y, int x) { OpenList.RemoveAll((os) => os.X == x && os.Y == y); CellInfo cell = GetCellInfo(y, x); cell.Opened = false; cell.Closed = true; }