# fuaad-amin/thefarmerwasreplaced architecture

> Architecture diagram of the GitHub repository fuaad-amin/thefarmerwasreplaced, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fuaad-amin/thefarmerwasreplaced
- Repository: https://github.com/fuaad-amin/thefarmerwasreplaced

## Overview

This repository is a collection of automation scripts for a game: maze solving and treasure farming, QR-pattern placement, and cactus/infection farming. The main maze workflow is a farming script that dispatches small-maze workers; each worker makes a maze, invokes DFS, and harvests treasure. Separate scripts handle whole-field maze strategies and crop automation. The game runtime is external to the repository. Edges reflect visible calls or simulation setup; unsampled integrations are not inferred.

Main entry points: [`move_to.py`](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/move_to.py) (Tile navigation), [`Maze_Solvers_and_Experiments/Maze_spam.py`](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/Maze_spam.py) (Maze farming), [`cactus_parallell_ins.py`](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/cactus_parallell_ins.py) (Cactus farming), [`Maze_Solvers_and_Experiments/DFS.py`](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/DFS.py) (DFS solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_maze["Maze automation"]
  node_maze_spam["Maze farming<br/>[Maze_spam.py]"]
  node_maze_dfs["DFS solver<br/>[DFS.py]"]
  node_maze_tools["Maze creation and wall hugger<br/>[Solve_maze.py]"]
  node_maze_cheeze["Drone maze strategy<br/>[Maze cheeze.py]"]
end

subgraph group_qr["QR patterns"]
  node_qr_maker["QR coordinate placement<br/>[QR maker.py]"]
  node_qr_sim["QR simulator<br/>[QR sim.py]"]
end

subgraph group_farm["Crop farming"]
  node_cactus["Cactus farming"]
  node_infection["Field infection<br/>[infect_all.py]"]
end

subgraph group_shared["Shared movement"]
  node_movement["Tile navigation<br/>[move_to.py]"]
end

node_operator(("Game operator"))
node_runtime["Game runtime"]

node_operator -.->|"starts"| node_maze_spam
node_operator -.->|"starts"| node_maze_cheeze
node_operator -.->|"starts"| node_qr_sim
node_operator -.->|"starts"| node_cactus
node_maze_spam -->|"makes maze"| node_maze_tools
node_maze_spam -->|"runs solver"| node_maze_dfs
node_maze_spam -->|"navigates workers"| node_movement
node_maze_dfs -->|"moves during search"| node_movement
node_maze_dfs -->|"queries and moves"| node_runtime
node_maze_tools -->|"creates and solves"| node_runtime
node_maze_cheeze -->|"navigates field"| node_movement
node_maze_cheeze -->|"dispatches drones"| node_runtime
node_qr_sim -->|"simulates"| node_qr_maker
node_qr_maker -->|"places pattern"| node_movement
node_qr_maker -->|"draws tiles"| node_runtime
node_cactus -->|"optionally infects"| node_infection
node_cactus -->|"returns to start"| node_movement
node_cactus -->|"farms and sorts"| node_runtime
node_infection -->|"fertilizes field"| node_runtime

click node_maze_spam "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/Maze_spam.py"
click node_maze_dfs "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/DFS.py"
click node_maze_tools "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/Solve_maze.py"
click node_maze_cheeze "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/Maze%20cheeze.py"
click node_qr_maker "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/QR%20maker.py"
click node_qr_sim "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/QR%20sim.py"
click node_cactus "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/cactus_parallell_ins.py"
click node_infection "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/infect_all.py"
click node_movement "https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/move_to.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_maze_spam,node_maze_dfs,node_maze_tools,node_maze_cheeze toneBlue
class node_qr_maker,node_qr_sim toneAmber
class node_cactus,node_infection toneMint
class node_movement toneRose
class node_operator,node_runtime toneIndigo
```

## Components

### Maze automation

- [Maze farming](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/Maze_spam.py): `Maze_Solvers_and_Experiments/Maze_spam.py`
- [DFS solver](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/DFS.py): `Maze_Solvers_and_Experiments/DFS.py`
- [Maze creation and wall hugger](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/Solve_maze.py): `Maze_Solvers_and_Experiments/Solve_maze.py`
- [Drone maze strategy](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/Maze_Solvers_and_Experiments/Maze%20cheeze.py): `Maze_Solvers_and_Experiments/Maze cheeze.py`

### QR patterns

- [QR coordinate placement](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/QR%20maker.py): `QR maker.py`
- [QR simulator](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/QR%20sim.py): `QR sim.py`

### Crop farming

- [Cactus farming](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/cactus_parallell_ins.py): `cactus_parallell_ins.py`
- [Field infection](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/infect_all.py): `infect_all.py`

### Shared movement

- [Tile navigation](https://github.com/fuaad-amin/thefarmerwasreplaced/blob/main/move_to.py): `move_to.py`

### Other components

- **Game operator**
- **Game runtime**

## Connections

- Game operator → Maze farming: starts
- Game operator → Drone maze strategy: starts
- Game operator → QR simulator: starts
- Game operator → Cactus farming: starts
- Maze farming → Maze creation and wall hugger: makes maze (evidence: `Maze_Solvers_and_Experiments/Maze_spam.py`)
- Maze farming → DFS solver: runs solver (evidence: `Maze_Solvers_and_Experiments/Maze_spam.py`)
- Maze farming → Tile navigation: navigates workers (evidence: `Maze_Solvers_and_Experiments/Maze_spam.py`)
- DFS solver → Tile navigation: moves during search (evidence: `Maze_Solvers_and_Experiments/DFS.py`)
- DFS solver → Game runtime: queries and moves (evidence: `Maze_Solvers_and_Experiments/DFS.py`)
- Maze creation and wall hugger → Game runtime: creates and solves (evidence: `Maze_Solvers_and_Experiments/Solve_maze.py`)
- Drone maze strategy → Tile navigation: navigates field (evidence: `Maze_Solvers_and_Experiments/Maze cheeze.py`)
- Drone maze strategy → Game runtime: dispatches drones (evidence: `Maze_Solvers_and_Experiments/Maze cheeze.py`)
- QR simulator → QR coordinate placement: simulates (evidence: `QR sim.py`)
- QR coordinate placement → Tile navigation: places pattern (evidence: `QR maker.py`)
- QR coordinate placement → Game runtime: draws tiles (evidence: `QR maker.py`)
- Cactus farming → Field infection: optionally infects (evidence: `cactus_parallell_ins.py`)
- Cactus farming → Tile navigation: returns to start (evidence: `cactus_parallell_ins.py`)
- Cactus farming → Game runtime: farms and sorts (evidence: `cactus_parallell_ins.py`)
- Field infection → Game runtime: fertilizes field (evidence: `infect_all.py`)
