diff --git a/Program.cs b/Program.cs index 4633ba6..0486583 100644 --- a/Program.cs +++ b/Program.cs @@ -5,7 +5,7 @@ namespace matrix_4; class Program { static void Main(string[] args) { Console.Clear(); - int scelta, lineaAutobus, lineaAutobus2, fermataAutobus, conto; + int scelta, lineaAutobus, lineaAutobus2, fermataAutobus, fermataAutobus2, conto; (string[], string[], bool[,]) configurazione = Configurazione(); string[] fermateAutobus = configurazione.Item1, lineeAutobus = configurazione.Item2; bool[,] corrispondenzaLineaFermata = configurazione.Item3; @@ -13,8 +13,6 @@ class Program { do { - Console.WriteLine("Debug: corrispondenzaLineaFermata"); - MostraMatrice(corrispondenzaLineaFermata); Console.WriteLine("Inserire un'opzione:"); Console.WriteLine("1. La linea passa per la fermata?"); Console.WriteLine("2. Quali linee passano per la fermata?"); @@ -89,6 +87,7 @@ class Program { nullo = false; } } + if (nullo) { Console.WriteLine("Nessuna"); } @@ -102,6 +101,26 @@ class Program { break; case 5: Console.Clear(); + fermataAutobus = SelezionaElementoArray(fermateAutobus); + Console.Clear(); + fermataAutobus2 = SelezionaElementoArray(fermateAutobus); + Console.Clear(); + if (fermataAutobus != fermataAutobus2) { + Console.WriteLine($"Tra le fermate {fermataAutobus} e {fermataAutobus2} passano le linee"); + for (int i = 0; i < corrispondenzaLineaFermata.GetLength(1); i++) { + if (corrispondenzaLineaFermata[fermataAutobus, i] && corrispondenzaLineaFermata[fermataAutobus2, i]) { + Console.WriteLine(lineeAutobus[i]); + nullo = false; + } + } + + if (nullo) { + Console.WriteLine("Nessuna"); + } + } + else { + Console.WriteLine("Selezionare due fermate differenti."); + } Pausa(); break; diff --git a/bin/Debug/net9.0/matrix_4.dll b/bin/Debug/net9.0/matrix_4.dll index 3e0df22..368e696 100644 Binary files a/bin/Debug/net9.0/matrix_4.dll and b/bin/Debug/net9.0/matrix_4.dll differ diff --git a/bin/Debug/net9.0/matrix_4.pdb b/bin/Debug/net9.0/matrix_4.pdb index 72f4923..ccce407 100644 Binary files a/bin/Debug/net9.0/matrix_4.pdb and b/bin/Debug/net9.0/matrix_4.pdb differ diff --git a/obj/Debug/net9.0/matrix_4.AssemblyInfo.cs b/obj/Debug/net9.0/matrix_4.AssemblyInfo.cs index 426640a..65e9b79 100644 --- a/obj/Debug/net9.0/matrix_4.AssemblyInfo.cs +++ b/obj/Debug/net9.0/matrix_4.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("matrix_4")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9f8919a5b574eba0398cd547568ac709b540f80e")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c2792696c81e301c72c709b90a11629ec17f7a51")] [assembly: System.Reflection.AssemblyProductAttribute("matrix_4")] [assembly: System.Reflection.AssemblyTitleAttribute("matrix_4")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net9.0/matrix_4.AssemblyInfoInputs.cache b/obj/Debug/net9.0/matrix_4.AssemblyInfoInputs.cache index 3f27e31..aa8c505 100644 --- a/obj/Debug/net9.0/matrix_4.AssemblyInfoInputs.cache +++ b/obj/Debug/net9.0/matrix_4.AssemblyInfoInputs.cache @@ -1 +1 @@ -80491e960ab3c3ece613e74c8824978a6fa119e6468122d8e986f574efda6e8a +ed3107c54af0a051d8bb6245e1a705a87813e83c096ae66e5dec0cb1db26b3f8 diff --git a/obj/Debug/net9.0/matrix_4.dll b/obj/Debug/net9.0/matrix_4.dll index 3e0df22..368e696 100644 Binary files a/obj/Debug/net9.0/matrix_4.dll and b/obj/Debug/net9.0/matrix_4.dll differ diff --git a/obj/Debug/net9.0/matrix_4.pdb b/obj/Debug/net9.0/matrix_4.pdb index 72f4923..ccce407 100644 Binary files a/obj/Debug/net9.0/matrix_4.pdb and b/obj/Debug/net9.0/matrix_4.pdb differ diff --git a/obj/Debug/net9.0/ref/matrix_4.dll b/obj/Debug/net9.0/ref/matrix_4.dll index 95812c7..af186db 100644 Binary files a/obj/Debug/net9.0/ref/matrix_4.dll and b/obj/Debug/net9.0/ref/matrix_4.dll differ diff --git a/obj/Debug/net9.0/refint/matrix_4.dll b/obj/Debug/net9.0/refint/matrix_4.dll index 95812c7..af186db 100644 Binary files a/obj/Debug/net9.0/refint/matrix_4.dll and b/obj/Debug/net9.0/refint/matrix_4.dll differ