Metadata-Version: 2.5
Name: linpuzs
Version: 0.1.0
Summary: LinkedIn puzzle solver: screenshots your phone over ADB, solves the daily game, and taps in the answer.
License: MIT License
        
        Copyright (c) 2026 Pratyush
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: numpy>=1.26
Requires-Dist: pillow>=10.0
Requires-Dist: questionary>=2.0
Requires-Dist: rich>=13.7
Description-Content-Type: text/markdown

# linpuzs: Linkedin Puzzle Solver

For when you want the streak but not the 4 minutes of staring at coloured squares.

Plug in your Android phone, open today's LinkedIn puzzle and run `linpuzs`. It grabs a screenshot over ADB, figures out the board, solves it, and taps the answer in for you, usually in a few seconds.

### Supported games

| Game | Goal | How the answer is entered |
| --- | --- | --- |
| 👑 Queens | One crown in every row, column and colour region, none touching | Double-tap each crown cell |
| 🌗 Tango | Fill with suns and moons: balanced rows and columns, no three in a row, respect `=` and `×` | Tap each empty cell (once for sun, twice for moon) |
| 〰️ Zip | One path through every cell, passing the numbered dots in order | One continuous drag |
| 🔢 Mini Sudoku | 1-6 once in every row, column and 2×3 box | Tap the cell, then the number pad |
| 🧵 Patches | Split the grid into rectangles matching each clue's shape and size | Drag across each patch |

## Setup

Requires [uv](https://docs.astral.sh/uv/) and `adb` (Android platform-tools) on your PATH, with USB debugging enabled on the phone.

```bash
uv sync
uv run linpuzs
```

## Usage

```
linpuzs                      interactive: pick device (if several) → pick game → solve
linpuzs -g queens            solve one game without the menu
linpuzs -s SERIAL            use a specific device
linpuzs -n                   dry run: solve, but don't touch the screen
linpuzs --list               show games and solver status
```

**Dry run:** `linpuzs -n` (or `--dry-run`) reads the board from your phone, solves it and prints the solved board in the terminal, without tapping anything.

## Tests

No phone needed. Each game has two test files:

- `tests/test_<game>.py` checks the real screenshot in `media/example/`.
- `tests/test_<game>_fuzz.py` draws random boards the way the app does, solves them, and replays the touches.

```bash
uv run pytest -q                                      # everything (~1-2 min)
uv run pytest -q tests/test_zip.py                    # one game's screenshot tests
```
