From 30e37e3f22a914a3c1058bf7d4bf98884aa55b48 Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Fri, 24 May 2019 09:22:33 +0200 Subject: [PATCH] Added readme and added output argument --- README.txt | 12 ++++++++++++ TMI-practicum/Program.cs | 4 +++- TMI-practicum/TMI-practicum.csproj | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 README.txt diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..cecb375 --- /dev/null +++ b/README.txt @@ -0,0 +1,12 @@ +Het programma kan op volgende manieren uitgevoerd worden: + +- mono TMI_practicum.exe invoer.txt uitvoer.txt +- mono TMI_practicum.exe invoer.txt (de uitvoer wordt in output.txt geplaatst. +- mono TMI_practicum.exe (zonder argument wordt 'input.txt' gezocht en de uitvoer in output.txt geplaatst.) + +Alle dll's moeten in de map naast het uitvoerbaar bestand staan. + +Voor algoritme 1 en 2 werken alle gevallen. +Voor algoritme 3 werken de gevallen waarbij een bepaalde cirkel volledig in een andere cirkel gelegen is en dan snijdt met een andere cirkel niet. + +De uitvoer wordt in output.txt geplaatst. diff --git a/TMI-practicum/Program.cs b/TMI-practicum/Program.cs index cf5511c..52edcc9 100644 --- a/TMI-practicum/Program.cs +++ b/TMI-practicum/Program.cs @@ -25,6 +25,8 @@ namespace TMI_practicum Environment.Exit(1); } + if (args.Length > 1) OutputFile = args[1]; + (byte algorithm, _, IList circles) = ParseFile(inputFile); @@ -206,7 +208,7 @@ namespace TMI_practicum return (algorithm, nbCircles, circles); } - private const string OutputFile = "output.txt"; + private static string OutputFile = "output.txt"; private static void WriteOutput(IEnumerable intersections, double time) { diff --git a/TMI-practicum/TMI-practicum.csproj b/TMI-practicum/TMI-practicum.csproj index 7ab512f..0ffafd7 100644 --- a/TMI-practicum/TMI-practicum.csproj +++ b/TMI-practicum/TMI-practicum.csproj @@ -25,7 +25,7 @@ AnyCPU - pdbonly + none true bin\Release\ TRACE