Metadata-Version: 2.1
Name: dkopt
Version: 0.0.2
Summary: deck-optimizer is a Python module to support TCG deck building.
Home-page: https://github.com/hasoya/deck-optimizer
Author: hasoya
Author-email: 20637498+hasoya@users.noreply.github.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Games/Entertainment
Classifier: Topic :: Games/Entertainment :: Turn Based Strategy
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: loguru (>=0.5)
Requires-Dist: pyyaml (>=5.0)

# deck-optimizer

[![DockerPublish](https://github.com/hasoya/deck-optimizer/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/hasoya/deck-optimizer/actions/workflows/docker-publish.yml)
[![pytest](https://github.com/hasoya/deck-optimizer/actions/workflows/python-app.yml/badge.svg)](https://github.com/hasoya/deck-optimizer/actions/workflows/python-app.yml)

**deck-optimizer** is a Python module to support TCG deck building especially Yu-Gi-Oh!. This module suggest the best combination of cards under given conditions.

# Dependency
Use [Docker](https://www.docker.com/) or see [requirements.txt](https://github.com/hasoya/deck-optimizer/blob/main/requirements.txt).

# Usage
Make config yaml file to describe the ideal hand. For example, if you want to draw at least one PSY-Framegear Gamma and keep PSY-Frame Driver in deck, your config file will be written as below.

```yaml:config.yaml
num_hand: 5
num_deck:
  min: 40
  max: 60
condition:
  - name: Gamma
    min: 2
    max: 3
    require: 1
    exact: False
    in_hand: True
  - name: Driver
    min: 1
    max: 1
    require: 1
    exact: True
    in_hand: False
```

Then, run the app by following command.

```bash
docker pull ghcr.io/hasoya/deck-optimizer:v0.0.1
docker run -v /absolute/path/to/config/file:/config.yaml ghcr.io/hasoya/deck-optimizer:v0.0.1 -f /config.yaml
```

You will get the suggestion of deck composition and the probability of the ideal hand.

```bash
The best deck
  Total Num Deck: 40 Num Gamma in deck: 3 Num Driver in deck: 1
The probability of the ideal hand
  30.21%
```



