Code Monkey home page Code Monkey logo

mc-advent-of-code-2022's Introduction

Advent of Code 2022 in Minecraft

Computation and Design

All computations are done using datapacks. Inputs are generated with the get_inputs.py script and are parsed into the following format:

input text:

Hello
123 45

(0,-2)

parsed input:

[["H","e","l","l","o"],["1","2","3"," ","4","5"],[],["(","0",",","-","2",")"]]

Installation and Usage

Manual Input

The get_inputs.py script will attempt to download and parse all of your input files, but if you would like to test other inputs, the manual inputs will override the automatic download. To run a manual input, create a day_X.txt file in the manual_input folder.

Automatic Input

To automatically grab the input using your account, advent-of-code-data should first be installed:

pip install advent-of-code-data

Then bind you AOC session ID using the quickstart tutorial.

Running the Script

Once you've set up the inputs, run the get_input.py script:

python get_inputs.py

Installing the Datapack

Insert the datapack into your world (unzip the github download and put the advent_of_code_2022 folder into the datapacks folder of your world), then run the desired aoc_2022:_solve/day_x/part_x function. Visualizations can be run from the aoc_2022:visual/day_x/part_x function.
Function Examples:

function aoc_2022:_solve/day_1/part_1
function aoc_2022:visual/day_8/part_2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.