diff --git a/2019/Day1/obj/Day1.csproj.nuget.cache b/2019/Day1/obj/Day1.csproj.nuget.cache index 83616b6..5eac07c 100644 --- a/2019/Day1/obj/Day1.csproj.nuget.cache +++ b/2019/Day1/obj/Day1.csproj.nuget.cache @@ -1,5 +1,5 @@ { "version": 1, - "dgSpecHash": "DfsG1Rbuu0MifCdyhzwOpWJgwCGaLY0U7Hji/eAL5vU6ZTO1hkZILRkAlOEKiyyb7HrTnHKmM37H5e7PLmmxZA==", + "dgSpecHash": "Ap3VQtJ8/BxlCInmKYaCKhU/a9FJFIvOf9eWGQjUYV/shEG8jCuYGdIwCBInP6o4NHR8j1Kppg/lADhF9U54YQ==", "success": true } \ No newline at end of file diff --git a/2019/Day1/obj/Day1.csproj.nuget.dgspec.json b/2019/Day1/obj/Day1.csproj.nuget.dgspec.json index 4b37b5b..95baa4d 100644 --- a/2019/Day1/obj/Day1.csproj.nuget.dgspec.json +++ b/2019/Day1/obj/Day1.csproj.nuget.dgspec.json @@ -1,17 +1,17 @@ { "format": 1, "restore": { - "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj": {} + "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj": {} }, "projects": { - "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj": { + "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj", + "projectUniqueName": "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj", "projectName": "Day1", - "projectPath": "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj", + "projectPath": "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj", "packagesPath": "C:\\Users\\elias.almqvist\\.nuget\\packages\\", - "outputPath": "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\obj\\", + "outputPath": "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\obj\\", "projectStyle": "PackageReference", "fallbackFolders": [ "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" diff --git a/2019/Day1/obj/Day1.csproj.nuget.g.props b/2019/Day1/obj/Day1.csproj.nuget.g.props index e23907d..1523cbb 100644 --- a/2019/Day1/obj/Day1.csproj.nuget.g.props +++ b/2019/Day1/obj/Day1.csproj.nuget.g.props @@ -3,16 +3,16 @@ True NuGet - /home/elal/Projects/adventofcode/2019/Day1/obj/project.assets.json - /home/elal/.nuget/packages/ - /home/elal/.nuget/packages/ + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\elias.almqvist\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder PackageReference - 4.9.4 + 5.2.0 $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - + \ No newline at end of file diff --git a/2019/Day1/obj/Day1.csproj.nuget.g.targets b/2019/Day1/obj/Day1.csproj.nuget.g.targets index 3c1e569..cfeba20 100644 --- a/2019/Day1/obj/Day1.csproj.nuget.g.targets +++ b/2019/Day1/obj/Day1.csproj.nuget.g.targets @@ -4,7 +4,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - + + \ No newline at end of file diff --git a/2019/Day1/obj/Debug/netcoreapp2.2/Day1.assets.cache b/2019/Day1/obj/Debug/netcoreapp2.2/Day1.assets.cache index 7fc31d9..f44d841 100644 Binary files a/2019/Day1/obj/Debug/netcoreapp2.2/Day1.assets.cache and b/2019/Day1/obj/Debug/netcoreapp2.2/Day1.assets.cache differ diff --git a/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.CoreCompileInputs.cache b/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.CoreCompileInputs.cache index c8e498d..ecf389d 100644 --- a/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.CoreCompileInputs.cache +++ b/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -f79d1ed33da9ca6da7e131988eb0964470e8edf6 +a6a70b94ffdeb685dc98003c8a406062ce319973 diff --git a/2019/Day1/obj/project.assets.json b/2019/Day1/obj/project.assets.json index 5c5100e..f0346c5 100644 --- a/2019/Day1/obj/project.assets.json +++ b/2019/Day1/obj/project.assets.json @@ -686,24 +686,30 @@ ] }, "packageFolders": { - "/home/elal/.nuget/packages/": {} + "C:\\Users\\elias.almqvist\\.nuget\\packages\\": {}, + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "/home/elal/Projects/adventofcode/2019/Day1/Day1.csproj", + "projectUniqueName": "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj", "projectName": "Day1", - "projectPath": "/home/elal/Projects/adventofcode/2019/Day1/Day1.csproj", - "packagesPath": "/home/elal/.nuget/packages/", - "outputPath": "/home/elal/Projects/adventofcode/2019/Day1/obj/", + "projectPath": "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj", + "packagesPath": "C:\\Users\\elias.almqvist\\.nuget\\packages\\", + "outputPath": "c:\\EliasPrograms\\adventofcode\\2019\\Day1\\obj\\", "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ], "configFilePaths": [ - "/home/elal/.nuget/NuGet/NuGet.Config" + "C:\\Users\\elias.almqvist\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], "originalTargetFrameworks": [ "netcoreapp2.2" ], "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "https://api.nuget.org/v3/index.json": {} }, "frameworks": { diff --git a/2019/Day2/Part1.cs b/2019/Day2/Part1.cs new file mode 100644 index 0000000..913a789 --- /dev/null +++ b/2019/Day2/Part1.cs @@ -0,0 +1,34 @@ +using System; +using System.IO; + +namespace Part1 { + public class vars{ + public enum intcode : int { + ADD = 1, + MULT = 2, + STOP = 99 + } + public int NEXT = 4; // steps per opcode + } + public class compile { + public vars.intcode getOpcode( int opcode ) { + return (vars.intcode)opcode; // return the opcode, if 1 then return "ADD" etc + } + + public void runopcode( int index, vars.intcode opcode ) { + if( opcode == vars.intcode.ADD ) { + + } + } + + public int[] intcode( int[] input ) { + int[] output = input; // make an instanse of the input where we can change stuff + for( int i = 0; i < input.Length; i++ ) { + vars.intcode opcode = getOpcode(input[i]); + //Console.WriteLine( getOpcode(input[i]).ToString() + " | " + i.ToString() ); + runopcode( i, opcode ); + } + return output; + } + } +} diff --git a/2019/Day2/Program.cs b/2019/Day2/Program.cs index ebebc19..461c0fb 100644 --- a/2019/Day2/Program.cs +++ b/2019/Day2/Program.cs @@ -1,9 +1,19 @@ using System; +using System.IO; namespace Day2 { class Program { static void Main(string[] args) { string input = File.ReadAllText(@"./input.txt"); // get the input + + string[] inputs = input.Split( ",", StringSplitOptions.None ); + int[] intcodes = Array.ConvertAll( inputs, str => int.Parse( str ) ); // convert all of the contents to int's + + int[] output = new int[intcodes.Length]; + + Part1.compile compile = new Part1.compile(); + compile.intcode( intcodes ); + } } } diff --git a/2019/Day2/bin/Debug/netcoreapp2.2/Day2.deps.json b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.deps.json new file mode 100644 index 0000000..d001880 --- /dev/null +++ b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v2.2", + "signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v2.2": { + "Day2/1.0.0": { + "runtime": { + "Day2.dll": {} + } + } + } + }, + "libraries": { + "Day2/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/2019/Day2/bin/Debug/netcoreapp2.2/Day2.dll b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.dll new file mode 100644 index 0000000..35bc5d0 Binary files /dev/null and b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.dll differ diff --git a/2019/Day2/bin/Debug/netcoreapp2.2/Day2.pdb b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.pdb new file mode 100644 index 0000000..f6f19ec Binary files /dev/null and b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.pdb differ diff --git a/2019/Day2/bin/Debug/netcoreapp2.2/Day2.runtimeconfig.dev.json b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.runtimeconfig.dev.json new file mode 100644 index 0000000..dc3b903 --- /dev/null +++ b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.runtimeconfig.dev.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "additionalProbingPaths": [ + "C:\\Users\\elias.almqvist\\.dotnet\\store\\|arch|\\|tfm|", + "C:\\Users\\elias.almqvist\\.nuget\\packages", + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ] + } +} \ No newline at end of file diff --git a/2019/Day2/bin/Debug/netcoreapp2.2/Day2.runtimeconfig.json b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.runtimeconfig.json new file mode 100644 index 0000000..49dbda4 --- /dev/null +++ b/2019/Day2/bin/Debug/netcoreapp2.2/Day2.runtimeconfig.json @@ -0,0 +1,9 @@ +{ + "runtimeOptions": { + "tfm": "netcoreapp2.2", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "2.2.0" + } + } +} \ No newline at end of file diff --git a/2019/Day2/input.txt b/2019/Day2/input.txt new file mode 100644 index 0000000..96bdd57 --- /dev/null +++ b/2019/Day2/input.txt @@ -0,0 +1 @@ +1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,1,10,19,1,19,6,23,2,23,13,27,1,27,5,31,2,31,10,35,1,9,35,39,1,39,9,43,2,9,43,47,1,5,47,51,2,13,51,55,1,55,9,59,2,6,59,63,1,63,5,67,1,10,67,71,1,71,10,75,2,75,13,79,2,79,13,83,1,5,83,87,1,87,6,91,2,91,13,95,1,5,95,99,1,99,2,103,1,103,6,0,99,2,14,0,0 \ No newline at end of file diff --git a/2019/Day2/obj/Day2.csproj.nuget.cache b/2019/Day2/obj/Day2.csproj.nuget.cache index aca1394..8204a07 100644 --- a/2019/Day2/obj/Day2.csproj.nuget.cache +++ b/2019/Day2/obj/Day2.csproj.nuget.cache @@ -1,5 +1,5 @@ { "version": 1, - "dgSpecHash": "WGPy0F+3AX2FrBKpPAYLKoPyKm8mT9nvSxwf1DU0kcg+H41fJVNHn+vTzdr7A/b3qqioCrpqhVX0rXrCRgYD0A==", + "dgSpecHash": "k94jWAVAo0NJ8nobTwOKlsjof88fE7r24yVvZ8q7gCAnxQUY11s52T3YOZ43y8pYkXSUpnffhxCmrqevKrUTRg==", "success": true } \ No newline at end of file diff --git a/2019/Day2/obj/Day2.csproj.nuget.dgspec.json b/2019/Day2/obj/Day2.csproj.nuget.dgspec.json new file mode 100644 index 0000000..062a159 --- /dev/null +++ b/2019/Day2/obj/Day2.csproj.nuget.dgspec.json @@ -0,0 +1,60 @@ +{ + "format": 1, + "restore": { + "C:\\EliasPrograms\\adventofcode\\2019\\Day2\\Day2.csproj": {} + }, + "projects": { + "C:\\EliasPrograms\\adventofcode\\2019\\Day2\\Day2.csproj": { + "version": "1.0.0", + "restore": { + "projectUniqueName": "C:\\EliasPrograms\\adventofcode\\2019\\Day2\\Day2.csproj", + "projectName": "Day2", + "projectPath": "C:\\EliasPrograms\\adventofcode\\2019\\Day2\\Day2.csproj", + "packagesPath": "C:\\Users\\elias.almqvist\\.nuget\\packages\\", + "outputPath": "C:\\EliasPrograms\\adventofcode\\2019\\Day2\\obj\\", + "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ], + "configFilePaths": [ + "C:\\Users\\elias.almqvist\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" + ], + "originalTargetFrameworks": [ + "netcoreapp2.2" + ], + "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, + "https://api.nuget.org/v3/index.json": {} + }, + "frameworks": { + "netcoreapp2.2": { + "projectReferences": {} + } + }, + "warningProperties": { + "warnAsError": [ + "NU1605" + ] + } + }, + "frameworks": { + "netcoreapp2.2": { + "dependencies": { + "Microsoft.NETCore.App": { + "suppressParent": "All", + "target": "Package", + "version": "[2.2.0, )", + "autoReferenced": true + } + }, + "imports": [ + "net461" + ], + "assetTargetFallback": true, + "warn": true + } + } + } + } +} \ No newline at end of file diff --git a/2019/Day2/obj/Day2.csproj.nuget.g.props b/2019/Day2/obj/Day2.csproj.nuget.g.props index 94264e6..1523cbb 100644 --- a/2019/Day2/obj/Day2.csproj.nuget.g.props +++ b/2019/Day2/obj/Day2.csproj.nuget.g.props @@ -3,16 +3,16 @@ True NuGet - /home/elal/Projects/adventofcode/2019/Day2/obj/project.assets.json - /home/elal/.nuget/packages/ - /home/elal/.nuget/packages/ + $(MSBuildThisFileDirectory)project.assets.json + $(UserProfile)\.nuget\packages\ + C:\Users\elias.almqvist\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder PackageReference - 4.9.4 + 5.2.0 $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - + \ No newline at end of file diff --git a/2019/Day2/obj/Day2.csproj.nuget.g.targets b/2019/Day2/obj/Day2.csproj.nuget.g.targets index 3c1e569..cfeba20 100644 --- a/2019/Day2/obj/Day2.csproj.nuget.g.targets +++ b/2019/Day2/obj/Day2.csproj.nuget.g.targets @@ -4,7 +4,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - + + \ No newline at end of file diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.AssemblyInfo.cs b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.AssemblyInfo.cs new file mode 100644 index 0000000..61f3be5 --- /dev/null +++ b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.AssemblyInfo.cs @@ -0,0 +1,23 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Day2")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyProductAttribute("Day2")] +[assembly: System.Reflection.AssemblyTitleAttribute("Day2")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generated by the MSBuild WriteCodeFragment class. + diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.AssemblyInfoInputs.cache b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.AssemblyInfoInputs.cache new file mode 100644 index 0000000..496bcfc --- /dev/null +++ b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +f6e643a8a4174bfa34f74b88aad58d6a947b1b86 diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.assets.cache b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.assets.cache new file mode 100644 index 0000000..a6ada15 Binary files /dev/null and b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.assets.cache differ diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csproj.CoreCompileInputs.cache b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..6ee8181 --- /dev/null +++ b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +f69870805a1a9a2284bc4856da9b8fe4d4374980 diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csproj.FileListAbsolute.txt b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0009b7c --- /dev/null +++ b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +C:\EliasPrograms\adventofcode\2019\Day2\obj\Debug\netcoreapp2.2\Day2.csprojAssemblyReference.cache +C:\EliasPrograms\adventofcode\2019\Day2\obj\Debug\netcoreapp2.2\Day2.csproj.CoreCompileInputs.cache +C:\EliasPrograms\adventofcode\2019\Day2\obj\Debug\netcoreapp2.2\Day2.AssemblyInfoInputs.cache +C:\EliasPrograms\adventofcode\2019\Day2\obj\Debug\netcoreapp2.2\Day2.AssemblyInfo.cs +C:\EliasPrograms\adventofcode\2019\Day2\bin\Debug\netcoreapp2.2\Day2.deps.json +C:\EliasPrograms\adventofcode\2019\Day2\bin\Debug\netcoreapp2.2\Day2.runtimeconfig.json +C:\EliasPrograms\adventofcode\2019\Day2\bin\Debug\netcoreapp2.2\Day2.runtimeconfig.dev.json +C:\EliasPrograms\adventofcode\2019\Day2\bin\Debug\netcoreapp2.2\Day2.dll +C:\EliasPrograms\adventofcode\2019\Day2\bin\Debug\netcoreapp2.2\Day2.pdb +C:\EliasPrograms\adventofcode\2019\Day2\obj\Debug\netcoreapp2.2\Day2.dll +C:\EliasPrograms\adventofcode\2019\Day2\obj\Debug\netcoreapp2.2\Day2.pdb diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csprojAssemblyReference.cache b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csprojAssemblyReference.cache new file mode 100644 index 0000000..0004c39 Binary files /dev/null and b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.csprojAssemblyReference.cache differ diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.dll b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.dll new file mode 100644 index 0000000..35bc5d0 Binary files /dev/null and b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.dll differ diff --git a/2019/Day2/obj/Debug/netcoreapp2.2/Day2.pdb b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.pdb new file mode 100644 index 0000000..f6f19ec Binary files /dev/null and b/2019/Day2/obj/Debug/netcoreapp2.2/Day2.pdb differ diff --git a/2019/Day2/obj/project.assets.json b/2019/Day2/obj/project.assets.json index c37314b..d6eb3ba 100644 --- a/2019/Day2/obj/project.assets.json +++ b/2019/Day2/obj/project.assets.json @@ -688,24 +688,30 @@ ] }, "packageFolders": { - "/home/elal/.nuget/packages/": {} + "C:\\Users\\elias.almqvist\\.nuget\\packages\\": {}, + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "/home/elal/Projects/adventofcode/2019/Day2/Day2.csproj", + "projectUniqueName": "c:\\EliasPrograms\\adventofcode\\2019\\Day2\\Day2.csproj", "projectName": "Day2", - "projectPath": "/home/elal/Projects/adventofcode/2019/Day2/Day2.csproj", - "packagesPath": "/home/elal/.nuget/packages/", - "outputPath": "/home/elal/Projects/adventofcode/2019/Day2/obj/", + "projectPath": "c:\\EliasPrograms\\adventofcode\\2019\\Day2\\Day2.csproj", + "packagesPath": "C:\\Users\\elias.almqvist\\.nuget\\packages\\", + "outputPath": "c:\\EliasPrograms\\adventofcode\\2019\\Day2\\obj\\", "projectStyle": "PackageReference", + "fallbackFolders": [ + "C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder" + ], "configFilePaths": [ - "/home/elal/.nuget/NuGet/NuGet.Config" + "C:\\Users\\elias.almqvist\\AppData\\Roaming\\NuGet\\NuGet.Config", + "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], "originalTargetFrameworks": [ "netcoreapp2.2" ], "sources": { + "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, "https://api.nuget.org/v3/index.json": {} }, "frameworks": {