non working stuff that you cant read

master
AlmTech Software 5 years ago
parent e72b6d3b6d
commit fed63f7f62
  1. 2
      2019/Day1/Part1.cs
  2. 60
      2019/Day1/Part2.cs
  3. 19
      2019/Day1/Program.cs
  4. BIN
      2019/Day1/bin/Debug/netcoreapp2.2/Day1.dll
  5. BIN
      2019/Day1/bin/Debug/netcoreapp2.2/Day1.pdb
  6. 5
      2019/Day1/bin/Debug/netcoreapp2.2/Day1.runtimeconfig.dev.json
  7. 2
      2019/Day1/obj/Day1.csproj.nuget.cache
  8. 10
      2019/Day1/obj/Day1.csproj.nuget.g.props
  9. 4
      2019/Day1/obj/Day1.csproj.nuget.g.targets
  10. BIN
      2019/Day1/obj/Debug/netcoreapp2.2/Day1.assets.cache
  11. 2
      2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.CoreCompileInputs.cache
  12. 33
      2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.FileListAbsolute.txt
  13. BIN
      2019/Day1/obj/Debug/netcoreapp2.2/Day1.csprojAssemblyReference.cache
  14. BIN
      2019/Day1/obj/Debug/netcoreapp2.2/Day1.dll
  15. BIN
      2019/Day1/obj/Debug/netcoreapp2.2/Day1.pdb
  16. 18
      2019/Day1/obj/project.assets.json

@ -5,7 +5,7 @@ namespace Part1 {
public class Get {
public int[] FuelModules( string[] inputs ) {
int[] output = new int[100];
int[] output = new int[inputs.Length];
double input_;
for ( int i = 0; i < inputs.Length; i++ ) {
input_ = Convert.ToDouble(inputs[i]);

@ -1,14 +1,56 @@
using System;
using System.IO;
using System.Collections.Generic;
namespace Part2 {
public class Get {
public int GetTotalFuel( int[] modules ) {
for( int i = 0; i < modules.Length; i++ ) {
}
return 0;
}
}
public List<int[]> AllFuelModules( int[] modules ) {
// declare the variables
List<int[]> returnList = new List<int[]>();
int[] modulesofmodule = new int[999]; // should be big enough xd
float mod;
int placeholder;
int count = -1; // dumb method ikr
for( int i = 0; i < modules.Length; i++ ) { // loop through the modules
Console.WriteLine("----");
mod = (float)modules[i]; // make it a double
placeholder = (int)mod;
//modulesofmodule[count] = (int)mod;
while( placeholder > 0 ) { // if the placeholder is greater than 0
count++;
placeholder = (int)Math.Floor( mod/3 ) - 2; // then do the fuel calc for the fuel module
if( placeholder < 0 ) { // if less than 0 then just make it 0
placeholder = 0;
modulesofmodule[count] = (int)placeholder; // add it to its own little list
} else {
modulesofmodule[count] = (int)placeholder; // same here
}
Console.WriteLine( count.ToString() + " val: " + placeholder.ToString() );
}
count = -1; // reset the count
Console.WriteLine( "ID: " + i.ToString() );
returnList.Add( modulesofmodule ); // place the array in the list for that module
}
return returnList; // return the complete list
}
public int RealFuelSum( List<int[]> fuelmodules ) {
int sum = 0;
for( int arrayid = 0; arrayid < fuelmodules.Count; arrayid++ ) {
for( int i = 0; i < fuelmodules[arrayid].Length; i++ ) {
sum += fuelmodules[arrayid][i];
//Console.WriteLine( "Module " + arrayid.ToString() + "/" + fuelmodules.Count.ToString() + " | " + i.ToString() + "/" + fuelmodules[arrayid].Length.ToString() + " | val: " + fuelmodules[arrayid][i].ToString() );
}
}
return sum;
}
}
}

@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Collections.Generic;
namespace Day1 {
class Program {
@ -7,11 +8,21 @@ namespace Day1 {
string input = File.ReadAllText(@"./input.txt"); // get the input
string[] inputs = input.Split( Environment.NewLine, StringSplitOptions.None );
int[] modules = new int[100];
int[] modules = new int[inputs.Length];
Part1.Get get1 = new Part1.Get();
modules = get1.FuelModules( inputs ); // get the fuel for the mass'es
Console.WriteLine( get1.FuelSum( modules ) );
List<int[]> modulesOfModules = new List<int[]>();
Part2.Get get2 = new Part2.Get();
modulesOfModules = get2.AllFuelModules( modules );
Console.Write( "Real sum of fuel: " );
Console.Write( get2.RealFuelSum(modulesOfModules) );
Console.Write( "\n" );
Part1.Get get = new Part1.Get();
modules = get.FuelModules( inputs ); // get the fuel for the mass'es
Console.WriteLine( get.FuelSum( modules ) );
}
}
}

@ -1,9 +1,8 @@
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\elias.almqvist\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\elias.almqvist\\.nuget\\packages",
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
"/home/elal/.dotnet/store/|arch|/|tfm|",
"/home/elal/.nuget/packages"
]
}
}

@ -1,5 +1,5 @@
{
"version": 1,
"dgSpecHash": "JsYfYS0s9wrU4Z/u1Je7fqDyQdlcA7kVznR0QKJ6Q9dxlvqC/2jbG7imGO1NUgO1xyQZ7tppBzeO+v3thHXdzA==",
"dgSpecHash": "DfsG1Rbuu0MifCdyhzwOpWJgwCGaLY0U7Hji/eAL5vU6ZTO1hkZILRkAlOEKiyyb7HrTnHKmM37H5e7PLmmxZA==",
"success": true
}

@ -3,16 +3,16 @@
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\elias.almqvist\.nuget\packages\;C:\Program Files\dotnet\sdk\NuGetFallbackFolder</NuGetPackageFolders>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/home/elal/Projects/adventofcode/2019/Day1/obj/project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/elal/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/elal/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.2.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">4.9.4</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.2.0\build\netcoreapp2.2\Microsoft.NETCore.App.props" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.2.0\build\netcoreapp2.2\Microsoft.NETCore.App.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.netcore.app/2.2.0/build/netcoreapp2.2/Microsoft.NETCore.App.props" Condition="Exists('$(NuGetPackageRoot)microsoft.netcore.app/2.2.0/build/netcoreapp2.2/Microsoft.NETCore.App.props')" />
</ImportGroup>
</Project>

@ -4,7 +4,7 @@
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
<Import Project="C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.2.0\build\netcoreapp2.2\Microsoft.NETCore.App.targets" Condition="Exists('C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.2.0\build\netcoreapp2.2\Microsoft.NETCore.App.targets')" />
<Import Project="$(NuGetPackageRoot)netstandard.library/2.0.3/build/netstandard2.0/NETStandard.Library.targets" Condition="Exists('$(NuGetPackageRoot)netstandard.library/2.0.3/build/netstandard2.0/NETStandard.Library.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.netcore.app/2.2.0/build/netcoreapp2.2/Microsoft.NETCore.App.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.netcore.app/2.2.0/build/netcoreapp2.2/Microsoft.NETCore.App.targets')" />
</ImportGroup>
</Project>

@ -1 +1 @@
ef1d77eae137f939d9813c710a8e37f5204edb6a
f79d1ed33da9ca6da7e131988eb0964470e8edf6

@ -1,11 +1,22 @@
C:\EliasPrograms\adventofcode\2019\Day1\obj\Debug\netcoreapp2.2\Day1.csprojAssemblyReference.cache
C:\EliasPrograms\adventofcode\2019\Day1\obj\Debug\netcoreapp2.2\Day1.csproj.CoreCompileInputs.cache
C:\EliasPrograms\adventofcode\2019\Day1\obj\Debug\netcoreapp2.2\Day1.AssemblyInfoInputs.cache
C:\EliasPrograms\adventofcode\2019\Day1\obj\Debug\netcoreapp2.2\Day1.AssemblyInfo.cs
C:\EliasPrograms\adventofcode\2019\Day1\bin\Debug\netcoreapp2.2\Day1.deps.json
C:\EliasPrograms\adventofcode\2019\Day1\bin\Debug\netcoreapp2.2\Day1.runtimeconfig.json
C:\EliasPrograms\adventofcode\2019\Day1\bin\Debug\netcoreapp2.2\Day1.runtimeconfig.dev.json
C:\EliasPrograms\adventofcode\2019\Day1\bin\Debug\netcoreapp2.2\Day1.dll
C:\EliasPrograms\adventofcode\2019\Day1\bin\Debug\netcoreapp2.2\Day1.pdb
C:\EliasPrograms\adventofcode\2019\Day1\obj\Debug\netcoreapp2.2\Day1.dll
C:\EliasPrograms\adventofcode\2019\Day1\obj\Debug\netcoreapp2.2\Day1.pdb
C:/EliasPrograms/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csprojAssemblyReference.cache
C:/EliasPrograms/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.CoreCompileInputs.cache
C:/EliasPrograms/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.AssemblyInfoInputs.cache
C:/EliasPrograms/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.AssemblyInfo.cs
C:/EliasPrograms/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.deps.json
C:/EliasPrograms/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.runtimeconfig.json
C:/EliasPrograms/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.runtimeconfig.dev.json
C:/EliasPrograms/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.dll
C:/EliasPrograms/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.pdb
C:/EliasPrograms/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.dll
C:/EliasPrograms/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.pdb
/home/elal/Projects/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.deps.json
/home/elal/Projects/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.runtimeconfig.json
/home/elal/Projects/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.runtimeconfig.dev.json
/home/elal/Projects/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.dll
/home/elal/Projects/adventofcode/2019/Day1/bin/Debug/netcoreapp2.2/Day1.pdb
/home/elal/Projects/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csprojAssemblyReference.cache
/home/elal/Projects/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.csproj.CoreCompileInputs.cache
/home/elal/Projects/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.AssemblyInfoInputs.cache
/home/elal/Projects/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.AssemblyInfo.cs
/home/elal/Projects/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.dll
/home/elal/Projects/adventofcode/2019/Day1/obj/Debug/netcoreapp2.2/Day1.pdb

@ -686,30 +686,24 @@
]
},
"packageFolders": {
"C:\\Users\\elias.almqvist\\.nuget\\packages\\": {},
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {}
"/home/elal/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj",
"projectUniqueName": "/home/elal/Projects/adventofcode/2019/Day1/Day1.csproj",
"projectName": "Day1",
"projectPath": "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\Day1.csproj",
"packagesPath": "C:\\Users\\elias.almqvist\\.nuget\\packages\\",
"outputPath": "C:\\EliasPrograms\\adventofcode\\2019\\Day1\\obj\\",
"projectPath": "/home/elal/Projects/adventofcode/2019/Day1/Day1.csproj",
"packagesPath": "/home/elal/.nuget/packages/",
"outputPath": "/home/elal/Projects/adventofcode/2019/Day1/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"
"/home/elal/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"netcoreapp2.2"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {

Loading…
Cancel
Save