Metadata-Version: 2.4
Name: chess-variant
Version: 1.0.1
Summary: A Python API wrapper for Fairyground Variant Challenge.
Home-page: https://fairyground-variant-challenge-da13e5b81e44.herokuapp.com/
Author: Aarush Chugh
Author-email: aachugh@uchicago.edu
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Chess Variant Python API Wrapper

A simple Python wrapper around the [Fairyground Variant Challenge API](https://fairyground-variant-challenge-da13e5b81e44.herokuapp.com/api/docs).

## Installation

```bash
pip install chess-variant
```

## Usage

```python
import chess_variant

# 1. Get all supported chess variants
variants = chess_variant.get_variants()
print("Supported Variants:", list(variants['variants'].keys())[:5])

# 2. Create a new game room
game_info = chess_variant.create_game(variant="3check", white="Alice", tc="3+2")
room_id = game_info['roomId']
print(f"Created game! Game URL: {game_info['gameUrl']}")

# 3. Get the state of the game
state = chess_variant.view_game(room_id)
print("Current FEN:", state['fen'])

# 4. Generate PGN
pgn = chess_variant.get_pgn(room_id)
print(pgn)

# 5. Check all active rooms
active_rooms = chess_variant.get_active_rooms()
print(f"Currently {active_rooms['count']} active rooms.")
```

## Available Methods
- `get_variants()`
- `create_game(variant="chess", white="White", time_control="5+5")`
- `get_game(room_id)`
- `get_game_result(room_id)`
- `get_moves(room_id)`
- `get_fen(room_id)`
- `get_pgn(room_id)`
- `get_active_rooms()`
- `get_all_rooms()`
