# fluffis/adventofcode2019 architecture

> Architecture diagram of the GitHub repository fluffis/adventofcode2019, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fluffis/adventofcode2019
- Repository: https://github.com/fluffis/adventofcode2019

## Overview

##### Main Components Structure

- [Core Framework]
- AocDay.java (Interface)
- DayInterface.java
- Main.java
- GridUtils.java

- [Year-Specific Implementations]
- 2019 Solutions
- 2020 Solutions
- 2021 Solutions
- 2022 Solutions
- 2023 Solutions

##### Component Relationships
- Rectangle (Blue): Core framework classes
- Rectangle (Green): Year implementations
- Rectangle (Yellow): Utility classes
- Diamond (Orange): Data files
- Circle (Purple): Test cases

##### Detailed Architecture Breakdown

- [Main.java] --> [DayInterface]
- ↓
- [AocDay (Abstract)]
- ↓
- [Year Implementations]
- ↓
- [Individual Day Solutions]
- ↓
- [Input/Output Handlers]

##### Special Components to Highlight
- IntCodeMachine/LongCodeMachine (2019-specific)
- GridUtils (shared utility)
- Test Framework Structure

##### Data Flow Representation
- [Input Files (.in)] --> [Day Solutions] --> [Output Files (.out)]
- ↑
- [Test Validation]

Key Design Elements to Include:

##### Core Framework Layer
- Inheritance relationships
- Extension points

##### Solution Implementation Layer
- By year
- Common patterns
- Shared utilities

##### Testing Framework
- Test input/output relationship
- Validation flow
- Test case organization

##### Utility Components
- Grid utilities
- IntCode/LongCode machines
- Helper classes

- Blue: Core framework components
- Green: Solution implementations
- Yellow: Utility classes
- Orange: Data files
- Purple: Test components
- Red: Critical path flows

##### Year-specific components

- High-level architecture visibility
- Implementation detail clarity
- Testing framework integration
- Data flow representation

- Component relationships
- Special markers

This will create a comprehensive yet understandable representation of the project's architecture while maintaining the specific focus on Advent of Code challenge solutions.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Core Framework Components
    Main["Main.java"]:::core
    AocDay["AocDay Interface"]:::core
    DayInterface["DayInterface"]:::core
    GridUtils["GridUtils"]:::utility

    %% Year Implementation Containers
    subgraph Years
        Y2019["2019 Solutions"]:::year
        Y2020["2020 Solutions"]:::year
        Y2021["2021 Solutions"]:::year
        Y2022["2022 Solutions"]:::year
        Y2023["2023 Solutions"]:::year
    end

    %% Special 2019 Components
    IntCode["IntCodeMachine"]:::special
    LongCode["LongCodeMachine"]:::special
    MachineParam["Machine Parameters"]:::special

    %% Data Files
    subgraph InputData
        Data2019["2019 Input Files"]:::data
        Data2020["2020 Input Files"]:::data
        Data2021["2021 Input Files"]:::data
        Data2022["2022 Input Files"]:::data
        Data2023["2023 Input Files"]:::data
    end

    %% Test Framework
    subgraph Tests
        Test2019["2019 Tests"]:::test
        Test2020["2020 Tests"]:::test
        Test2021["2021 Tests"]:::test
        Test2022["2022 Tests"]:::test
        Test2023["2023 Tests"]:::test
    end

    %% Relationships
    Main --> DayInterface
    DayInterface --> AocDay
    AocDay --> Years
    GridUtils --> Years

    Y2019 --> IntCode
    Y2019 --> LongCode
    IntCode --> MachineParam
    LongCode --> MachineParam

    Y2019 --> Data2019
    Y2020 --> Data2020
    Y2021 --> Data2021
    Y2022 --> Data2022
    Y2023 --> Data2023

    Y2019 --> Test2019
    Y2020 --> Test2020
    Y2021 --> Test2021
    Y2022 --> Test2022
    Y2023 --> Test2023

    %% Styling
    classDef core fill:#a8d1f0,stroke:#333
    classDef year fill:#90EE90,stroke:#333
    classDef utility fill:#FFE5B4,stroke:#333
    classDef special fill:#FFA07A,stroke:#333
    classDef data fill:#FFB6C1,stroke:#333
    classDef test fill:#DDA0DD,stroke:#333

    %% Click Events
    click Main "https://github.com/fluffis/adventofcode2019/blob/master/src/se/fluff/aoc/Main.java"
    click AocDay "https://github.com/fluffis/adventofcode2019/blob/master/src/se/fluff/aoc/AocDay.java"
    click DayInterface "https://github.com/fluffis/adventofcode2019/blob/master/src/se/fluff/aoc/DayInterface.java"
    click GridUtils "https://github.com/fluffis/adventofcode2019/blob/master/src/se/fluff/aoc/GridUtils.java"
    click Y2019 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2019/days/"
    click Y2020 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2020/days/"
    click Y2021 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2021/days/"
    click Y2022 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2022/days/"
    click Y2023 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2023/days/"
    click IntCode "https://github.com/fluffis/adventofcode2019/blob/master/src/se/fluff/aoc2019/IntCodeMachine.java"
    click LongCode "https://github.com/fluffis/adventofcode2019/blob/master/src/se/fluff/aoc2019/LongCodeMachine.java"
    click MachineParam "https://github.com/fluffis/adventofcode2019/blob/master/src/se/fluff/aoc2019/MachineParam.java"
    click Data2019 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2019/data/"
    click Data2020 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2020/data/"
    click Data2021 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2021/data/"
    click Data2022 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2022/data/"
    click Data2023 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2023/data/"
    click Test2019 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2019/tests/"
    click Test2020 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2020/tests/"
    click Test2021 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2021/tests/"
    click Test2022 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2022/tests/"
    click Test2023 "https://github.com/fluffis/adventofcode2019/tree/master/src/se/fluff/aoc2023/tests/"
```
