{"id":51054966,"url":"https://github.com/haseebn19/hostage-chess","last_synced_at":"2026-06-22T20:31:04.175Z","repository":{"id":363211297,"uuid":"1252759621","full_name":"haseebn19/hostage-chess","owner":"haseebn19","description":"A multiplayer web-based implementation of Hostage Chess with full rules enforcement, real-time timers, and game history","archived":false,"fork":false,"pushed_at":"2026-06-07T22:22:04.000Z","size":280,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T00:17:22.920Z","etag":null,"topics":["chess","chess-engine","python","python3","webapp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haseebn19.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-28T20:58:44.000Z","updated_at":"2026-06-07T22:22:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/haseebn19/hostage-chess","commit_stats":null,"previous_names":["haseebn19/hostage-chess"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/haseebn19/hostage-chess","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haseebn19%2Fhostage-chess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haseebn19%2Fhostage-chess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haseebn19%2Fhostage-chess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haseebn19%2Fhostage-chess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haseebn19","download_url":"https://codeload.github.com/haseebn19/hostage-chess/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haseebn19%2Fhostage-chess/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34665259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","chess-engine","python","python3","webapp"],"created_at":"2026-06-22T20:31:03.561Z","updated_at":"2026-06-22T20:31:04.165Z","avatar_url":"https://github.com/haseebn19.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hostage Chess\n\n[![CI](https://github.com/haseebn19/hostage-chess/actions/workflows/ci.yml/badge.svg)](https://github.com/haseebn19/hostage-chess/actions/workflows/ci.yml)\n\n\u003cimg src=\"docs/logo.svg\" alt=\"Hostage Chess Logo\" width=\"250\"\u003e\n\nA multiplayer web-based implementation of Hostage Chess with full rules enforcement, real-time timers, and game history.\n\n## Screenshots\n\n\u003cimg src=\"docs/screenshot-gameboard.jpeg\" alt=\"Game Board\" width=\"500\"\u003e\n\n\u003cimg src=\"docs/screenshot-hostage-exhange.jpeg\" alt=\"Hostage Exchange\" width=\"500\"\u003e\n\n\u003cimg src=\"docs/screenshot-history.jpeg\" alt=\"Game History\" width=\"500\"\u003e\n\n## Features\n\n- **Complete Hostage Chess rules**: Captures go to prison, drop pieces from your airfield, exchange hostages with piece-value validation\n- **Server-side move validation**: All moves are validated by the game engine, making illegal moves impossible.\n- **Real-time multiplayer**: Two-player HTTP polling architecture with automatic matchmaking\n- **Timed games \u0026 Resignations**: 5-minute chess clock per player with automatic timeout handling and a manual resignation option\n- **Game history \u0026 replay**: Browse past games and step through each move\n- **Modern dark UI**: Clean responsive interface built with chessboard.js\n\n## Prerequisites\n\n- Python 3.11+\n\n## Installation\n\n```bash\ngit clone https://github.com/haseebn19/hostage-chess.git\ncd hostage-chess\n\n# Create virtual environment\npython -m venv .venv\n\n# Activate virtual environment\n# On Windows:\n.venv\\Scripts\\activate\n# On macOS/Linux:\nsource .venv/bin/activate\n\n# Install the package\npip install .\n```\n\n## Usage\n\n```bash\npython -m hostage_chess 8080\n```\n\n1. Open `http://localhost:8080` in your browser\n2. Enter a player handle and click **Play**\n3. Open a second tab, enter a different handle, and join the game\n4. Play chess! Drag pieces to make moves, use the **Drop Piece** and **Exchange Hostage** buttons for hostage mechanics\n\n## Development\n\n### Setup\n\n```bash\n# Create and activate virtual environment\npython -m venv .venv\n.venv\\Scripts\\activate  # Windows\nsource .venv/bin/activate  # macOS/Linux\n\n# Install in editable mode with dev dependencies\npip install -e \".[dev]\"\n```\n\n### Testing\n\n```bash\npytest\n```\n\nWith coverage:\n\n```bash\npytest --cov=src --cov-report=html\n```\n\n### Linting\n\n```bash\nruff check .\nruff format --check .\n```\n\n## Building\n\n```bash\npip install build\npython -m build\n```\n\nOutput location: `dist/`\n\n## Project Structure\n\n```\nhostage-chess/\n├── src/\n│   └── hostage_chess/\n│       ├── engine/         # Pure-Python chess engine\n│       │   ├── board.py    # Board state, FEN, serialisation\n│       │   ├── moves.py    # Legal move generation\n│       │   ├── hostage.py  # Prison, airfield, drops, exchanges\n│       │   └── result.py   # Checkmate, stalemate detection\n│       └── server/         # HTTP server\n│           ├── app.py      # Routes and request handling\n│           ├── database.py # SQLite operations\n│           └── templates.py# HTML page templates\n├── static/\n│   ├── css/            # Custom styles\n│   ├── js/             # Client-side game logic\n│   ├── img/            # Chess piece images\n│   └── vendor/         # Third-party libraries\n├── tests/              # Test suite (100 tests)\n├── .github/workflows/  # CI pipeline\n├── pyproject.toml      # Project config\n└── LICENSE             # MIT License\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Credits\n\n- [chessboard.js](https://chessboardjs.com/) - Board rendering and piece drag-and-drop\n- [jQuery](https://jquery.com/) - DOM manipulation (required by chessboard.js)\n- [Chess Pieces Sprite](https://commons.wikimedia.org/wiki/File:Chess_Pieces_Sprite.svg) - SVG chess pieces from Wikimedia Commons\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n*Originally developed for CIS\\*2750 at the University of Guelph.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaseebn19%2Fhostage-chess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaseebn19%2Fhostage-chess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaseebn19%2Fhostage-chess/lists"}