This commit is contained in:
Jona Krampe
2022-12-20 15:13:36 +00:00
parent e8a2145715
commit 4dafaa6540
43 changed files with 85 additions and 3 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"java.project.sourcePaths": ["src"],
"java.project.outputPath": "bin",
"java.project.referencedLibraries": [
"lib/**/*.jar"
]
}
+18
View File
@@ -0,0 +1,18 @@
## Getting Started
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
## Folder Structure
The workspace contains two folders by default, where:
- `src`: the folder to maintain sources
- `lib`: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
## Dependency Management
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
+27
View File
@@ -0,0 +1,27 @@
import java.io.IOException;
import java.io.RandomAccessFile;
public class main {
public static void main(String[] args) throws IOException {
RandomAccessFile file = new RandomAccessFile("input.txt", "r");
String str;
//Part 1
System.out.print("Part 1: ");
while ((str = file.readLine()) != null) {
System.out.println(str);
int blueprintID = Integer.typeOf(str.substring(11,12));
int costOfOreRobot = str.subString();
simulateRobotWithBlueprints();
}
//Part 2
System.out.print("Part 2: ");
}
public int simulateRobotWithBlueprints(int costOfOreRobot, int costOfClayRobot, int costOfObsidianRobot, int costOfGeodeRobot, int timeInMinutes) {
int maximumNumberOfOpenedGeodes = 0;
return maximumNumberOfOpenedGeodes;
}
}